Commit Graph
100 Commits
Author SHA1 Message Date
Nathan SoboandAntonio Scandurra ee9ee294ad Improve sender styling
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-08-26 09:17:43 -06:00
Nathan SoboandMax Brunsfeld 8f86fa1ccd Associate messages with their sender, fetching senders if necessary
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-08-25 14:20:03 -06:00
77c7fa53da Introduce Orientation concept to List
When the Orientation is Bottom, we paint elements from the bottom of the list when underflowing and express scroll position relative to the bottom. In either orientation, when inserting elements outside the visible area, we adjust the scroll position as needed to keep the visible elements stable.

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-08-25 12:45:17 -06:00
Nathan SoboandMax Brunsfeld 33dbbf271e WIP
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-08-24 18:09:36 -07:00
Nathan SoboandMax Brunsfeld 0187ac8fde Share a single pool of LineWrappers across all threads
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-08-24 18:16:13 -06:00
Nathan SoboandMax Brunsfeld 3ac489a8b6 Fix panic when scrolling non-overflowing lists
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-08-24 17:51:37 -06:00
Nathan SoboandMax Brunsfeld a79b32cfc2 Apply theme to chat messages
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-08-24 17:46:41 -06:00
Nathan SoboandMax Brunsfeld 87a103bc52 💄
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-08-24 17:46:41 -06:00
Nathan SoboandMax Brunsfeld 621203eb60 Group more elements under workspace theme struct
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-08-24 17:38:26 -06:00
Nathan SoboandMax Brunsfeld e69d1f9a9b Break up theme module
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-08-24 17:33:56 -06:00
Nathan SoboandMax Brunsfeld f8fb45912d Avoid redundant notification after creating the ChannelList when not authenticated
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-08-24 17:18:40 -06:00
Nathan SoboandMax Brunsfeld ff966c8d04 Fix off-by-1 in Channel::messages_in_range
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-08-24 17:17:55 -06:00
Nathan Sobo 3ad894b7e8 Hit the local server when debugging 2021-08-24 17:11:40 -06:00
Nathan Sobo 8559be9f92 Default unstyled text to be red instead of transparent 2021-08-24 17:11:27 -06:00
Nathan SoboandAntonio Scandurra 2701abde11 WIP
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-08-24 09:29:14 -06:00
Nathan SoboandAntonio Scandurra 39ad7f6a60 Make RPC client's current user_id observable
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-08-24 08:37:32 -06:00
Nathan SoboandAntonio Scandurra 9b636fb81e Add "Zed > Sign" In menu item
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-08-24 08:29:36 -06:00
Nathan SoboandAntonio Scandurra e4a232acc9 Send messages on enter
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-08-24 08:15:46 -06:00
Nathan SoboandAntonio Scandurra d34f374fe7 Beautify error logging
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-08-24 08:15:24 -06:00
Nathan Sobo 86effd64a2 Get project compiling with type-safe actions 2021-08-22 21:02:48 -06:00
Nathan Sobo 638b533fc7 WIP 2021-08-22 13:29:54 -06:00
Nathan Sobo 24639ec900 WIP 2021-08-22 11:58:19 -06:00
Nathan Sobo 030de803fe WIP: Start on List::layout
Perform layout on any elements that we haven't yet laid out.
2021-08-21 13:40:45 -06:00
Nathan Sobo d68e0b0b97 Remove after_layout from Element trait
Now that layout takes a MutableAppContext we don't need an after_layout phase.
2021-08-20 16:40:45 -06:00
Nathan Sobo d0a5bc694c WIP 2021-08-20 16:34:46 -06:00
Nathan Sobo c3dda14490 WIP: Move sum_tree module into gpui so we can use it in List 2021-08-20 16:18:39 -06:00
9ff764983d Flatten theme styles by eliminating top-level ui key
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-08-20 10:44:34 -06:00
Nathan Sobo 9b7756f566 Use singular names in theme and number surfaces from 0 2021-08-20 10:18:05 -06:00
Nathan Sobo a4882169c2 Fetch messages when joining a channel 2021-08-19 15:25:20 -06:00
Nathan Sobo 9336c02867 Start on a peer2 module with an alternative implementation 2021-08-18 21:59:13 -06:00
Nathan Sobo 3f5db7284d Remove shared_worktrees map from ClientState
Each worktree instance now handles its own messages.
2021-08-18 19:16:40 -06:00
Nathan SoboandMax Brunsfeld 37f24d10ec Subscribe to worktree messages at the entity level
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-08-18 19:06:46 -06:00
Nathan SoboandMax Brunsfeld ef421d735d Implement broadcast of typed envelopes
This required a rework of the macro so that we can always construct a typed envelope from our list of available message types from incoming protobuf envelopes.

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-08-18 13:12:27 -06:00
541f58e12c Start on subscribing to messages in channel entity instances
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-08-18 11:45:29 -06:00
Nathan Sobo 5b599a32b8 WIP 2021-08-06 16:06:03 -06:00
Nathan Sobo 149fb574c7 Expose titlebar_height in LayoutContext 2021-08-06 09:11:16 -06:00
Nathan Sobo e16c62ed0e Add platform::Window::titlebar_height 2021-08-06 09:08:29 -06:00
Nathan Sobo 34eb2c446f Start on custom titlebar 2021-08-05 11:48:35 -06:00
Nathan Sobo d9ab406961 Merge pull request #123 from zed-industries/fix-word-boundary-movement-multibyte
Fix moving to next word boundary with multi-byte characters
2021-08-05 08:59:20 -06:00
Nathan Sobo 01fcec53d7 Merge pull request #125 from zed-industries/theme-variables
Add flexible theme system
2021-08-05 08:57:52 -06:00
Nathan SoboandMax Brunsfeld 522fac9690 Fix compile error in tests
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-08-04 17:56:38 -06:00
Nathan SoboandMax Brunsfeld 1a21902460 Move fuzzy mod out of worktree
We now match against arbitrary strings in addition to paths.

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-08-04 17:46:53 -06:00
Nathan Sobo 593afb2d9e Change reload theme binding 2021-08-04 17:34:15 -06:00
Nathan Sobo 039dae064c Remove logging 2021-08-04 17:09:15 -06:00
Nathan Sobo 85a076312a Merge branch 'main' into theme-variables 2021-08-04 16:47:43 -06:00
Nathan Sobo d484d80238 Match file finder icon color to label color 2021-08-04 16:17:33 -06:00
Nathan Sobo 33a8942c8b Pull empty selector label styling from correct place in theme 2021-08-04 16:12:15 -06:00
Nathan Sobo 7494a395ed Specify tab padding in theme 2021-08-04 16:08:15 -06:00
Nathan SoboandMax Brunsfeld 4d947580b1 Reload current theme on cmd-k shift-T
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-08-04 15:52:23 -06:00
Nathan SoboandMax Brunsfeld 56354c7623 Avoid crashes when laying out lines containing byte order marks
This solution isn't perfect and we'll probably have layout bugs with these lines, but this prevents us from triggering undefined behavior.

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-08-04 11:52:21 -06:00
Nathan Sobo 5761756fb4 Move remaining theme-related code and tests from settings mod to theme mod 2021-08-03 19:42:39 -06:00
Nathan SoboandMax Brunsfeld 90b51c3356 Implement themes::ThemeRegistry::get
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-08-03 19:35:15 -06:00
Nathan SoboandMax Brunsfeld ca9862fff1 Start on new theme::ThemeRegistry
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-08-03 18:51:06 -06:00
Nathan Sobo 200e278bc9 💄 2021-08-02 20:07:48 -06:00
Nathan Sobo 4c53470800 Notify all views when a theme is selected 2021-08-02 16:57:10 -06:00
Nathan SoboandMax Brunsfeld c306ac007c Allow more time wrapping to complete synchronously
We're seeing occasional flickers and wondering if this will help.

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-07-30 09:50:28 -07:00
Nathan Sobo e7d03af942 Fix moving to previous word across a wrap boundary
I'm just going to the end of the soft-wrapped line, mirroring the behavior with hard wraps. It's maybe not perfectly technically correct but that behavior would require us to consider word boundaries outside of the current line, which doesn't seem worth the complexity.
2021-07-30 09:50:28 -07:00
Nathan SoboandMax Brunsfeld aab51e7576 Add some incomplete tests for movement
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-07-30 09:50:28 -07:00
Nathan SoboandAntonio Scandurra 492a09f1be Fix movement across soft wrap boundaries
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-07-30 09:50:28 -07:00
Nathan SoboandAntonio Scandurra c779633154 Make unfolding inclusive
If the range *touches* the fold, we unfold. This was needed to fix the behavior for unfolding at the current selection position. Previously, there was some kind of translation issue that was allowing us to accidentally work the way we wanted without this.

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-07-30 09:50:28 -07:00
Nathan SoboandAntonio Scandurra 38d4662a4e Only honor rightward bias for buffer points *inside* of folds
(Not at boundaries)

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-07-30 09:50:28 -07:00
Nathan SoboandAntonio Scandurra a6a8f4fd81 Introduce a struct for spanned_rows result
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-07-30 09:50:28 -07:00
Nathan SoboandAntonio Scandurra 029460bf7e Respect buffer row boundaries in line-oriented edit operations
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-07-30 09:50:28 -07:00
Nathan SoboandAntonio Scandurra 84fc8f0f4f Don't let people retry randomized tests
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-07-30 09:50:28 -07:00
Nathan SoboandAntonio Scandurra 6efadd19dd Reuse FontCache across randomized tests
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-07-30 09:50:28 -07:00
Nathan SoboandAntonio Scandurra a1991a7458 Report the end of the current row rather than the start of the next
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-07-30 09:50:28 -07:00
Nathan Sobo 613192974f Don't render line numbers for soft-wrapped line segments 2021-07-30 09:50:28 -07:00
Nathan Sobo 47187172b7 Clip left when moving cursor to end of line
This ensures we stay on the same line when the current display line ends with a soft wrap.
2021-07-30 09:50:28 -07:00
Nathan Sobo b14721fd7f Clip left when moving vertically 2021-07-30 09:50:28 -07:00
Nathan Sobo 7a5f1b5446 Preserve logical scroll position when wrap width changes 2021-07-30 09:50:28 -07:00
Nathan Sobo 61b5d66ba8 Eliminate input/output nomenclature from fold_map
Instead, just use FoldPoint, FoldOffset, etc. We don't need the naming to be general because we know exactly which layer we're building on at each layer of the DisplayMap.
2021-07-25 08:22:50 -06:00
Nathan Sobo da50576129 Fix remaining errors and warnings 2021-07-25 07:56:53 -06:00
Nathan Sobo 9edc8b9a06 WIP 2021-07-24 08:40:48 -06:00
Nathan Sobo 3bf47be51e WIP 2021-07-24 08:09:04 -06:00
Nathan Sobo f81f043058 WIP 2021-07-23 12:25:09 -06:00
11285f3762 Pass a MutableAppContext to Element::layout and ::dispatch_event
We need to mutate the app in these cases to relay layout state, so this just makes things easier. We won't be able to perform layout in parallel but it's questionable whether we'll ever actually do that. If we do, we can revisit.

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-07-23 10:52:08 -06:00
Nathan Sobo f169f8e358 Ensure that soft wrapped lines don't cause horizontal scrolling 2021-07-21 12:27:01 -06:00
Nathan Sobo 699e558db9 Remove logging 2021-07-21 11:21:13 -06:00
Nathan Sobo b513df3844 WIP 2021-07-20 17:22:03 -06:00
Nathan SoboandMax Brunsfeld ee213696aa Replace DeterministicExecutor::reset with forbid_parking
There's really no point calling reset if we plan on parking afterwards.

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-07-20 12:28:04 -06:00
Nathan Sobo 64927abbc4 Allow DeterministicExecutor to park until forbid_parking is called
This allows us to perform async setup such as talking to the database.
2021-07-20 12:22:02 -06:00
Nathan SoboandMax Brunsfeld 3b77b011e2 Iterate on randomized wrapping test and fix some bugs
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-07-19 19:31:03 -06:00
Nathan SoboandMax Brunsfeld e0da3fd714 Get the randomized soft wrap test passing with no edits
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-07-19 18:37:29 -06:00
Nathan SoboandMax Brunsfeld 2ce42ff6b6 Honor the last line when wrapping even if it doesn't end in \n
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-07-19 18:29:20 -06:00
Nathan Sobo e193a660aa WIP 2021-07-19 13:59:07 -06:00
Nathan SoboandMax Brunsfeld 8b34deab58 Try to return edits from FoldMap::apply_edits
The goal is to describe how the fold map changed. Hopefully this is correct.

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-07-15 15:08:18 -06:00
Nathan SoboandMax Brunsfeld 2c9f730638 Give the FoldMap its own edit type that does not have deleted_lines
We want to use this struct to communicate about edits performed to the fold map itself, and it will be simpler if we don't have to communicate this data.

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-07-15 14:19:58 -06:00
Nathan SoboandMax Brunsfeld 2bde54971e Move all FoldMap query methods to FoldMapSnapshot
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-07-15 11:36:24 -06:00
Nathan Sobo 09afba9251 Introduce buffer::Content<'a> struct to share logic with buffer::Snapshot
We want to move a bunch of methods on FoldMap to fold_map::Snapshot. This captures a buffer snapshot, and we'll need a bunch of methods that currently are on Buffer to also be implemented on buffer::Snapshot. This Content reference struct will be a good zero-cost place to store that logic.
2021-07-15 09:50:50 -06:00
Nathan Sobo a074f4664b Merge pull request #109 from zed-industries/server
Include contents of the zed-server repo
2021-07-13 15:52:00 -06:00
Nathan SoboandMax Brunsfeld 82569a031f Fix race condition in integration test
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-07-13 13:24:48 -06:00
Nathan SoboandMax Brunsfeld 411e7df931 Move Fs trait into its own module
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-07-13 12:52:42 -06:00
Nathan SoboandMax Brunsfeld 86ca442fbe Fix CSS purge path
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-07-12 14:50:51 -06:00
Nathan SoboandMax Brunsfeld 9a6c4a1718 Pass arguments to cargo run in script/server
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-07-12 14:50:39 -06:00
Nathan SoboandMax Brunsfeld 1537500fcb Include contents of the zed-server repo
We're going full monorepo.

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-07-12 14:14:39 -06:00
Nathan Sobo 4aab70d7fb Remove authentication at the RPC layer
This means we can remove IOHandler and return a simple future that is Send
2021-07-09 21:57:10 -06:00
Nathan Sobo 89ef4d760d Send an Authorization HTTP header when connecting web sockets 2021-07-09 21:27:33 -06:00
Nathan Sobo 4ffd29bd81 Pass AppState as action arg to workspace:share_worktree 2021-07-09 21:26:54 -06:00
Nathan SoboandMax Brunsfeld 73db910a95 Process remote worktree updates in the background
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-07-05 14:20:53 -06:00
Nathan SoboandMax Brunsfeld 036dcd50fd Start on applying remote worktree updates in the background
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-07-05 13:44:42 -06:00