Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support saved snippets #1391

Draft
wants to merge 15 commits into
base: main
Choose a base branch
from
Draft

Support saved snippets #1391

wants to merge 15 commits into from

Conversation

PIG208
Copy link
Member

@PIG208 PIG208 commented Mar 8, 2025

  • Viewing and inserting saved snippets
  • Adding new saved snippets
  • Handle saved snippet events

Fixes: #863

@PIG208 PIG208 force-pushed the pr-saved branch 2 times, most recently from 5c40618 to 66b1605 Compare March 11, 2025 22:45
PIG208 added 3 commits March 13, 2025 19:43
The theme already applies to all of our bottom sheets, and all of them
uses Clip.antiAlias already.

Signed-off-by: Zixuan James Li <[email protected]>
Not all buttons are about uploading files, while most of the
buttons on the compose box share the same design.  Extract that
part for later use.

Signed-off-by: Zixuan James Li <[email protected]>
Both widgets are agnostic to any specific compose controller,
so that we can reuse the styling elsewhere.

Signed-off-by: Zixuan James Li <[email protected]>
PIG208 added 12 commits March 14, 2025 16:29
This makes inline implementations for these build… methods possible,
without defining a separate StatelessWidget class.

Signed-off-by: Zixuan James Li <[email protected]>
This will later become useful for tetsing saved snippets, a feature only
available after server 10.

Signed-off-by: Zixuan James Li <[email protected]>
Signed-off-by: Zixuan James Li <[email protected]>
This will allow controller implementations that do not support
validation errors akin to "*TooLong" to set this to null.
TODO: look for a better way to arrange the new compose box

We sort the saved snippets by title to be consistent with the web
implementation.

A subtle nuance of having a compose box in a modal bottom sheet is that
the message list page behind will shift when the keyboard is expanded,
even though its compose box is not visible anyway.

An UX improvement would be preserving the inputs on the saved snippet
compose box after the user has navigated away.

Signed-off-by: Zixuan James Li <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add saved snippets
1 participant