Commit Graph
39175 Commits
Author SHA1 Message Date
Antonio ScandurraandNathan Sobo 619ecb277d Replace notify_all with an explicit refresh_windows effect
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-08-26 15:00:00 +02:00
Antonio Scandurra dbb53093f5 Fix retrieving recent channel messages 2021-08-26 14:14:22 +02:00
Antonio Scandurra 1469db51f5 Extract a TestDb to setup and tear down a database instance 2021-08-26 12:51:48 +02:00
Max Brunsfeld f1defa8991 WIP 2021-08-25 15:22:14 -07:00
Nathan SoboandMax Brunsfeld b97e81c814 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
449ff56000 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
Antonio ScandurraandNathan Sobo a07a15fd3e Run subscription/observation callbacks in the order they were added
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-08-25 17:35:27 +02:00
Antonio ScandurraandNathan Sobo 8e368d5946 Move pooling of line wrappers into FontCache
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-08-25 17:28:25 +02:00
Antonio ScandurraandNathan Sobo 20c52659c5 Support hard wraps in Text element
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-08-25 16:53:26 +02:00
Antonio ScandurraandNathan Sobo 6dc122378b Use Text in chat panel
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-08-25 16:42:35 +02:00
Antonio Scandurra aa5cf2f56f Calculate current line width correctly when wrapping shaped lines 2021-08-25 15:21:04 +02:00
Antonio Scandurra 4d508ea318 Wrap lines in Text element 2021-08-25 14:59:52 +02:00
Antonio Scandurra b6a91d0c0c Move LineWrapper into gpui 2021-08-25 10:43:54 +02:00
Max Brunsfeld cdf9a28fd4 wip2 2021-08-24 18:09:36 -07:00
Nathan SoboandMax Brunsfeld dea4d66468 WIP
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-08-24 18:09:36 -07:00
Max BrunsfeldandNathan Sobo c6d81056f9 Add LineWrapper::wrap_shaped_line
This allows us to perform wrapping based on
glyph positions in an already-shaped line. We
plan to use this in the new Text element,
because there we'll already need to do text
shaping as part of layout. This text isn't editable
so it won't need to be rewrapped with the same
frequency as the text editor's content.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-08-24 18:09:36 -07:00
Nathan SoboandMax Brunsfeld 42a0589321 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 2a3d0f02c0 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 5b27c67e70 Apply theme to chat messages
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-08-24 17:46:41 -06:00
Nathan SoboandMax Brunsfeld cce9c0fc33 💄
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-08-24 17:46:41 -06:00
Nathan SoboandMax Brunsfeld e7f1754dc3 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 08aa629ea7 Break up theme module
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-08-24 17:33:56 -06:00
Nathan SoboandMax Brunsfeld b3fdef13d9 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 68b61a381e 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 c93314d8f8 Hit the local server when debugging 2021-08-24 17:11:40 -06:00
Nathan Sobo 30ef3db6d5 Default unstyled text to be red instead of transparent 2021-08-24 17:11:27 -06:00
Max BrunsfeldandNathan Sobo 98fdb247c5 Add initial unit test for channel list
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-08-24 13:12:02 -07:00
Max Brunsfeld e6d88bc5fc When loggin in, send user id instead of creating a new watch channel 2021-08-24 13:11:37 -07:00
Antonio Scandurra 19f010048e Init chat_panel 2021-08-24 17:54:25 +02:00
Nathan SoboandAntonio Scandurra 44331f36b9 WIP
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-08-24 09:29:14 -06:00
Nathan SoboandAntonio Scandurra 773a17009f 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 1b74d9a7e7 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 d86460655c Send messages on enter
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-08-24 08:15:46 -06:00
Nathan SoboandAntonio Scandurra 8f3e8dc4a3 Beautify error logging
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-08-24 08:15:24 -06:00
Antonio Scandurra 10086d7397 Allow editor to be created in auto-height mode 2021-08-24 14:17:15 +02:00
Antonio Scandurra 4b37b16791 Render chat messages in ChatPanel 2021-08-24 12:23:50 +02:00
Max Brunsfeld 9e5bbafe90 Start work on subscribing to model from ChatPanel 2021-08-23 17:21:06 -07:00
Max BrunsfeldandNathan Sobo 0d4872c04d Allow subscription/notification to be cancelled by dropping the returned Subscription
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-08-23 15:54:24 -07:00
Max Brunsfeld d253d1032c Get light theme loading successfully 2021-08-23 15:09:18 -07:00
Max BrunsfeldandNathan Sobo 0ec6a19819 Remove model and view specific observe/subscribe methods
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-08-23 15:07:50 -07:00
Max Brunsfeld 8192b67458 Add ChannelList to AppState 2021-08-23 15:03:45 -07:00
Max BrunsfeldandNathan Sobo 29372d66df Add generic subscribe and observe methods to contexts
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-08-23 15:03:12 -07:00
Max BrunsfeldandNathan Sobo c88eb959e9 Simplify state associated with observations
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-08-23 15:03:08 -07:00
Max BrunsfeldandNathan Sobo 4c7a958815 Fix scrolling in List element
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-08-23 11:02:30 -07:00
Antonio ScandurraandNathan Sobo a1e0cd6793 WIP: Render dummy chat messages to test List
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-08-23 17:29:46 +02:00
Antonio ScandurraandNathan Sobo ed5e5365bd Give up on entities being Send and Sync
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-08-23 17:04:32 +02:00
Antonio ScandurraandNathan Sobo 3152018647 Implement scrolling and painting for List
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-08-23 16:41:48 +02:00
Antonio ScandurraandNathan Sobo abce48e6a3 Perform a full layout of List when width changes
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-08-23 16:04:23 +02:00
Antonio ScandurraandNathan Sobo 7c24fd5a7f Implement and test splice for ListState
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-08-23 16:00:05 +02:00
Antonio ScandurraandNathan Sobo df55feb5cf Remove vestiges of after_layout
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-08-23 15:23:06 +02:00