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

Narrow symbols #1428

Merged
merged 2 commits into from
Sep 29, 2023
Merged

Narrow symbols #1428

merged 2 commits into from
Sep 29, 2023

Conversation

supascooopa
Copy link
Collaborator

@supascooopa supascooopa commented Sep 8, 2023

What does this PR do, and why?

Adding symbols to narrow buttons on the top left of the side UI. This is to improve UI visually.

External discussion & connections

  • Discussed in #zulip-terminal in topic
  • Fully fixes #
  • Partially fixes issue Add symbols for all supported narrows #1420
  • Builds upon previous unmerged work in PR #
  • Is a follow-up to work in PR #
  • Requires merge of PR #
  • Merge will enable work on #

How did you test this?

  • Manually - Behavioral changes
  • Manually - Visual changes
  • Adapting existing automated tests
  • Adding automated tests for new behavior (or missing tests)
  • Existing automated tests should already cover this (only a refactor of tested code)

Self-review checklist for each commit

  • It is a minimal coherent idea
  • It has a commit summary following the documented style (title & body)
  • It has a commit summary describing the motivation and reasoning for the change
  • It individually passes linting and tests
  • [x ] It contains test additions for any new behavior
  • It flows clearly from a previous branch commit, and/or prepares for the next commit

Visual changes

Before:
image

After:
image

@zulipbot zulipbot added the size: M [Automatic label added by zulipbot] label Sep 8, 2023
Copy link
Collaborator

@neiljp neiljp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@supascooopa Thanks for pushing this into a PR 👍

I looked at the tests - we have a flakey (unreliable) test, and restarting just one made them complete.

The symbols look good to me, though the star doesn't look as central vertically compared to the others, so not as good perhaps. One aspect of that we can explore is styling the symbols, maybe just bold or something similar. That is what led to me pointing out the prefix_markup, since it's easier to style the prefix separately from the text that way.

Do you plan to add the symbols to the narrows as viewed in the centre title area too?

zulipterminal/ui_tools/buttons.py Outdated Show resolved Hide resolved
zulipterminal/config/symbols.py Outdated Show resolved Hide resolved
@neiljp neiljp added the PR awaiting update PR has been reviewed & is awaiting update or response to reviewer feedback label Sep 9, 2023
@supascooopa
Copy link
Collaborator Author

@supascooopa Thanks for pushing this into a PR 👍

I looked at the tests - we have a flakey (unreliable) test, and restarting just one made them complete.

The symbols look good to me, though the star doesn't look as central vertically compared to the others, so not as good perhaps. One aspect of that we can explore is styling the symbols, maybe just bold or something similar. That is what led to me pointing out the prefix_markup, since it's easier to style the prefix separately from the text that way.

Do you plan to add the symbols to the narrows as viewed in the centre title area too?

I'm relived to find out that the test was not working properly and not something I did, I was being real careful to have my ducks in a row before pushing to remote this time.

I will give prefix_markup a try and see how the star symbol turns out that way.

I was actually planning to add the prefix symbols in the center title area but I wasn't sure to do it in this PR or next one. To clarify, you mean the area right below 'Messages' title right?

@neiljp
Copy link
Collaborator

neiljp commented Sep 12, 2023

@supascooopa If you're happy managing the prefix symbols in this PR then that's fine, as separate later commits to what you have already 👍

@zulipbot zulipbot added size: S [Automatic label added by zulipbot] and removed size: M [Automatic label added by zulipbot] labels Sep 17, 2023
@supascooopa
Copy link
Collaborator Author

@neiljp I've adjusted the prefix markers according to your suggestions. I wasn't sure how to implement the styling, add a brand new one to the styles or use an existing one so I just went with the latter.
I'll start working on prefix symbols on the narrow titles when we agree on the details on this area.

@neiljp
Copy link
Collaborator

neiljp commented Sep 17, 2023

@supascooopa Thanks for the update 👍

Structurally the code looks simpler using the prefix markup. I'm not entirely sure the bold makes too much difference for me and is sufficient, but with the common style name, we can easily adjust that at a later point.

Similarly the star marker looks 'high', but we can adjust later if finding a suitable alternative.

To support getting this into a mergeable state, before continuing, I'd suggest combining your most recent commits separately into the earlier two, since they are fixes to each respectively. Then once you have two commits, getting the commit titles according to our standards.


If you want to keep the substance of the commits from your previous iteration, then depending upon your comfort level with git, you might find it useful in future to add (or move) the fixing (fixup) commits right after each one you wish to change. That makes it clear if a new commit relates to an update to a specific earlier commit and makes it very simple to combine (fixup or squash) those with the earlier commit later. However, within Zulip it's also totally accepted to push to your branch with a completely fixed/updated set of commits, doing a force-push if necessary.

@supascooopa
Copy link
Collaborator Author

@neiljp Thank you for the suggestion regarding git I will keep it in mind next time.
I've squashed the commits you've mentioned, changed the commit messages and pushed them. I hope the commit messages are up to the standards :)

@neiljp
Copy link
Collaborator

neiljp commented Sep 26, 2023

@supascooopa This looks fine to move ahead with 👍

The first commit adds multiple symbols, not just the all-messages symbol, but we can deal with that detail later or on merging.

Are you working on the symbols for the central narrow titles now?

@supascooopa
Copy link
Collaborator Author

@neiljp Oh yes! I think it would be better to check the changes before writing the message next time.

I want to work on adding the symbols to the central narrow titles. Should I work on this draft or open a different one?

The 'Mentioned messages' and 'Starred messages' symbols are set to ASCII
characters, similar to those in the Zulip web app.

The selected 'All messages' symbol is the closest match found after some
testing, and appears to be available fairly widely. An appropriate
descriptive comment is added, as with other non-ASCII symbols, for later
reference.
This commit adds prefix symbols to the main buttons in the top left
corner of the UI. This aims to make the main buttons stand out more and
approximate the designs used in the web app.

This change also leads to a cleaner design, since these top buttons are
now indented and aligned similarly to the panels beneath them, eg. the
list of streams.

The symbol used as a prefix in headers of direct messages is reused for
the 'Direct messages' button, with other buttons using symbols added in
the previous commit.

The left part of the UI is increased in width to accommodate the new
additions.

Note that the "title" style is used to make the icons bolder, though
this should be decoupled in future.
@neiljp neiljp marked this pull request as ready for review September 29, 2023 01:31
@neiljp neiljp added PR ready to be merged PR has been reviewed & is ready to be merged enhancement New feature or request area: UI General user interface update and removed PR awaiting update PR has been reviewed & is awaiting update or response to reviewer feedback labels Sep 29, 2023
@neiljp
Copy link
Collaborator

neiljp commented Sep 29, 2023

@supascooopa I just tidied up the commit messages and pushed them back here - that way we can get this merged and in wider use.

Please review the differences I made in the commit messages. I also slightly adjusted your additions in the first commit, to ensure the existing and new markers were grouped more cleanly. You can fetch this PR with tools/fetch-pull-request, and compare this to what you already have locally with git diff and git range-diff

Note that you could have developed beyond this branch in a 2nd local branch ("on top of" this one), as long as you were willing to keep the 2nd one consistent with any changes to this - that's where you can rebase locally, and handle any conflicts. That can work well if you don't expect the first branch to change too much, while allowing you to continue working beyond that and being ready to push another branch/PR.

@neiljp neiljp merged commit 023e2ea into zulip:main Sep 29, 2023
20 checks passed
@neiljp neiljp added this to the Next Release milestone Sep 29, 2023
@supascooopa
Copy link
Collaborator Author

Thank you very much @neiljp. I will keep your advice in mind for next time.

@supascooopa supascooopa deleted the narrow_symbols branch November 2, 2023 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: UI General user interface update enhancement New feature or request PR ready to be merged PR has been reviewed & is ready to be merged size: S [Automatic label added by zulipbot]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants