-
Notifications
You must be signed in to change notification settings - Fork 306
Show marked/edited markers, without swipe gesture #762
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
Conversation
afd4add
to
92e10e5
Compare
Thanks! Looking forward to having this. @terpimost @alya for feedback on how the swipe gesture behaves from a user perspective.
For this I think the key is, instead of a |
Pushing the context so that part of it gets hidden, rather than rewrapping, makes sense to me. |
The text re-wrapping issue has been fixed. I have also added a responsive fix to the star alignment issue. It's a draft because I still need to add tests for it. |
Great. I was using the app this afternoon and happened to have a build from this PR on my phone, and found I really appreciated having the new information about which messages had been edited. That caused me to think of an idea for how we can split this into a part that delivers the key functionality and that we can merge soon, and a more complex part that can come after it as a follow-up:
I see the UI logic in this revision looks a lot cleaner, so that follow-up might happen soon after. Even then, though, I think the split will be helpful for reducing the per-PR complexity for review. So let's try making that split. |
cf311bd
to
44c75d2
Compare
I extracted a diff that implements the animation to #765. This PR should be ready for review after I have added the tests. |
dbadc55
to
1681a97
Compare
Rebased and added some test cases for the UI change. The tests are kind of similar to those for the star, because the edit marker are star both appear under the same Because of how |
GitHub is telling me that some conflicts have appeared; would you resolve those please? |
Just rebased the PR. |
For how I retrieved the current list of variables, see zulip#762 (comment) .
0d579c9
to
6a4db1f
Compare
With the new icons, not sure if the vertical offsets are needed anymore. |
On our screen-sharing call today, when you were running the app locally on Linux, it looked like you were seeing the symptom of #735. That suggests that your system has the text scaling set to >1x, i.e. the fonts are scaled up. If I crank the text size on my phone a couple of notches above default, I reproduce a layout more like your screenshots above. When making screenshots for a piece of layout that involves text, it'd be good to do so with a 1x text scale. It can be helpful to try smaller or larger scaling too, but 1x should be the baseline. I'm not sure what platform setting might be governing the text scaling Flutter picks up from the platform on Linux. If you can't readily find that setting, you can always add a hack locally in |
For the vertical alignment for these icons, there are probably fancy things we can do to get it just right for a range of situations — but let's skip that for the present, while we move on to other issues from our tracker. For now, let's just try to get it so that at 1x text scaling, when the message starts with a plain paragraph, the top of the edit icon doesn't stick out above the ascender line of the text, or anyway not by much more than the bottom of the icon sticks out below the baseline of the text. If we do that by a fixed few px of vertical adjustment, that'll be fine. |
Other than that layout issue, the code here all looks good modulo this small comment above: #762 (comment) Thanks for the revision! |
The icons are taken from the Vlad: https://chat.zulip.org/#narrow/stream/48-mobile/topic/.23F762.20edit.2Fmoved.20marker.20pill.20design/near/1891747 Signed-off-by: Zixuan James Li <[email protected]>
Signed-off-by: Zixuan James Li <[email protected]>
By aligning the row using `textBaseline`, we no longer need to apply the padding to the star. Fixes zulip#616. Signed-off-by: Zixuan James Li <[email protected]>
Updated the PR to add the vertical adjustments and replace the outdated icon font. Thanks for noticing that scaling issue! With the offset, default text scaling (fd38fb8)
|
This adds basic support to displaying a edited/moved marker next to the message content. As of now this is implemented without the swipe gesture control that would expand the marker. Partially addresses zulip#171. Signed-off-by: Zixuan James Li <[email protected]>
Great, thanks! Looks good — merging. I added a comment about those vertical offsets: + // These offsets are chosen ad hoc, but give a good vertical alignment
+ // of the icons with the first line of the message, when the message
+ // begins with a paragraph, at default text scaling. See:
+ // https://github.com/zulip/zulip-flutter/pull/762#issuecomment-2232041922
offset = const Offset(0, 2); Also edited the PR description so that #171 doesn't get accidentally closed. |
This consists of handpicked output from running the dart lint fix for code `avoid_types_on_closure_parameters`. We probably don't need to enable this linter rule because in many cases the type annotation improves readability. For the `(WidgetTester tester)` case, though, it is common and intuitive enough that the annotation shouldn't be necessary. See also: zulip#762 (comment) Signed-off-by: Zixuan James Li <[email protected]>
This consists of handpicked output from running the dart lint fix for code `avoid_types_on_closure_parameters`. We probably don't need to enable this linter rule because in many cases the type annotation improves readability. For the `(WidgetTester tester)` case, though, it is common and intuitive enough that the annotation shouldn't be necessary. See also: zulip#762 (comment) Signed-off-by: Zixuan James Li <[email protected]>
This consists of handpicked output from running the dart lint fix for code `avoid_types_on_closure_parameters`. We probably don't need to enable this linter rule because in many cases the type annotation improves readability. For the `(WidgetTester tester)` case, though, it is common and intuitive enough that the annotation shouldn't be necessary. See also: zulip#762 (comment) Signed-off-by: Zixuan James Li <[email protected]>
This consists of handpicked output from running the dart lint fix for code `avoid_types_on_closure_parameters`. We probably don't need to enable this linter rule because in many cases the type annotation improves readability. For the `(WidgetTester tester)` case, though, it is common and intuitive enough that the annotation shouldn't be necessary. See also: zulip#762 (comment) Signed-off-by: Zixuan James Li <[email protected]>
This consists of handpicked output from running the dart lint fix for code `avoid_types_on_closure_parameters`. We probably don't need to enable this linter rule because in many cases the type annotation improves readability. For the `(WidgetTester tester)` case, though, it is common and intuitive enough that the annotation shouldn't be necessary. See also: zulip#762 (comment) Signed-off-by: Zixuan James Li <[email protected]>
This is still a WIP.The swipe gesture is implemented such that the marker is
Notably, the content box still re-wraps as the marker pushes it to the right when it expands.To fix this, the content box might need to have a fixed size so the text can go off-screen and remain unchanged. This turned out to be tricky to accomplish.
This is stacked on top of #750. It fixes #616 and fixes part of #171.
Screen_Recording_20240624_164417.mp4