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

Nord theme #1139

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Nord theme #1139

wants to merge 3 commits into from

Conversation

felipecpassos
Copy link

@felipecpassos felipecpassos commented Oct 18, 2021

What does this PR do?

Added support for Nord theme.

Partial fix for #1133

Tested?

  • Manually
  • Existing tests (adapted, if necessary)
  • New tests added (for any new behavior)
  • Passed linting & tests (each commit)

Commit flow

Notes & Questions

Interactions

Visual changes

image

This commit adds nord theme to the list of themes (working only on 24bit mode).
Nord theme was inspired by https://www.nordtheme.com/
Lacking 256 and 16 color modes.
@zulipbot zulipbot added the size: XL [Automatic label added by zulipbot] label Oct 18, 2021
@felipecpassos
Copy link
Author

@neiljp is everything ok?

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.

@felipecpassos Thanks for looking into this - I've been away for a bit so just coming back to it now! 👍

You don't state this, but this is effectively a "dark ambiance" theme, to use the terminology on the Nord website?
If so, while the main Nord website doesn't seem to have much evidence of "white ambiance" designs in screenshots, it might be useful to use the _dark suffix for our theme like we have zt_dark and gruvbox_dark (which might eventually have the matching gruvbox_light, for example).

It's good to see the tests appear to run OK and manually the style looks to be rendering visually OK after a quick check, though I've not examined whether the nord colors match the recommended usage in detail.

For the color specification, for easier comparison with the source material, and also referencing within the styles, I feel it would be cleaner to order the NordColor entries in the same order as in their documentation, as well as use the descriptive prefixes eg. maybe FROST_7 and AURORA_ORANGE_12.

There are a few extra colors which aren't in the Nord palette - It may be challenging but I'd hope that we'd be able to avoid using them?

@neiljp neiljp added the PR awaiting update PR has been reviewed & is awaiting update or response to reviewer feedback label Nov 1, 2021
@felipecpassos
Copy link
Author

For the color specification, for easier comparison with the source material, and also referencing within the styles, I feel it would be cleaner to order the NordColor entries in the same order as in their documentation, as well as use the descriptive prefixes eg. maybe FROST_7 and AURORA_ORANGE_12.

About the color names, i gave them the same name from Nord pallete:

image

I called that color NORD_7. Would you prefer me to call it FROST_7 or FROST_1 ?

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.

@felipecpassos I added a few notes based on the changes you made already.

Re the numeric suffix, I used the <n> from nord<n> as a suffix since that's how the color is referenced in that document. I can see it being beneficial both ways. In my AURORA example I used ORANGE, so for the others we could include a primary index instead of a subtle color-name, so my examples might become FROST_1_n7 and AURORA_ORANGE_n12. Those last digits are the nord index, which we could also potentially list in an aligned comment at the end of each line, as they won't line up in the names.

For merging note that we'll likely want to squash the commits together manually before merging due to the rebase-oriented workflow we use.

@@ -86,7 +86,7 @@

THEMES = {
"gruvbox_dark": gruvbox,
"nord": nord,
"nord_dark": nord,
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is fine until we have a light version :)

@@ -95,6 +95,7 @@
THEME_ALIASES = {
"default": "zt_dark",
"gruvbox": "gruvbox_dark",
"nord": "nord_dark",
Copy link
Collaborator

Choose a reason for hiding this comment

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

This section was intended for historical aliases; I'd prefer we avoid supporting "nord" as a theme name for now, which is what this line would do.

@neiljp
Copy link
Collaborator

neiljp commented Nov 17, 2021

@felipecpassos Do you need more support with this?

@zulipbot
Copy link
Member

zulipbot commented Mar 4, 2022

Heads up @felipecpassos, we just merged some commits that conflict with the changes your made in this pull request! You can review this repository's recent commits to see where the conflicts occur. Please rebase your feature branch against the upstream/main branch and resolve your pull request's merge conflicts accordingly.

@neiljp
Copy link
Collaborator

neiljp commented Mar 4, 2022

@felipecpassos This will need a little more work after a few changes to styles, and I'd recommend for you or anyone else taking this up where there may be multiple versions (eg dark/light) to split the common color palette into a separate file, as we've now done for gruvbox.

@neiljp neiljp mentioned this pull request Mar 4, 2022
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: colors/styles/themes has conflicts PR awaiting update PR has been reviewed & is awaiting update or response to reviewer feedback size: XL [Automatic label added by zulipbot]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants