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

Added new theme gruvbox light Fixes #1133 #1144

Merged
merged 1 commit into from
Feb 19, 2022
Merged

Conversation

Dishti-Oberai
Copy link
Collaborator

@Dishti-Oberai Dishti-Oberai commented Dec 21, 2021

What does this PR do?

Fixes #1133

https://chat.zulip.org/#narrow/stream/206-zulip-terminal/topic/Gruvbox.20light.20.28Issue.20.23T1133.29

Tested?

  • Manually

Commit flow

Notes & Questions
The gruvbox_dark.py and gruvbox_light.py have been created and themes added. Also, colors_gruvbox.py stores common colors for both the themes (in themes directory). However, the gruvbox_light theme cant be seen in the themes list (have to still look into this). Everything is done as per discussion on CZO

Interactions

Visual changes
image
The gruvbox_dark theme looks like this (after the changes)

EDIT 1- Now gruvbox_light theme can be seen in the list of themes (Earlier it was being classified as an incomplete theme due to one missing element from styles but this has been resolved now)

EDIT 2- The visual representation of gruvbox_light and gruvbox_dark themes are as follows (since changes for this issue were made in files of these themes only)-
gruvbox_light
image

gruvbox_dark
image

PS: Both visuals (gruvbox_light and gruvbox_dark theme) are of hard version

@zulipbot zulipbot added the size: XL [Automatic label added by zulipbot] label Dec 21, 2021
@amanagr
Copy link
Member

amanagr commented Dec 21, 2021

@Dishti-Oberai your PR should only contain the changes that are required. Please read https://zulip.readthedocs.io/en/latest/contributing/index.html

@Dishti-Oberai
Copy link
Collaborator Author

Thanks @amanagr , I'll take care from next time.

@neiljp
Copy link
Collaborator

neiljp commented Jan 28, 2022

@Dishti-Oberai I recently pushed a commit to main excluding the .idea files, so I just pushed to your branch here without those files, which makes it a little easier to read.

Before I pushed, I rebased against main to get those changes in the branch, which has some side-effects for implementation, since we recently added a new style (msg_heading) which will now need to be present in the theme you're adding too.

You could fetch from the updated PR, or fetch main and rebase your local branch against that in future - the latter being a good idea in general.

Before pushing, I couldn't test it directly since I had some trouble running it - an error regarding DARK_RED. I still get it on this branch now.

In terms of implementation, I think this would be clearer and simpler if you could split the change into two commits:

  • one preparing for adding the new theme by refactoring the code so the behavior is very similar but implemented differently (eg. extracting common gruvbox colors)
  • the second simply adding the new theme file

Let us know here or in the stream if you need any extra feedback!
(I've not looked at the test issues; can you see what's going wrong?)

@neiljp neiljp added the PR awaiting update PR has been reviewed & is awaiting update or response to reviewer feedback label Jan 28, 2022
@Dishti-Oberai
Copy link
Collaborator Author

Thank you for the review @neiljp , I'll do the needful

@Dishti-Oberai
Copy link
Collaborator Author

@neiljp
I have figured out why was DARK_RED prompting an error and have resolved it as well.
I want to gain some insight into the steps of implementation that you have mentioned.... should I now make 2 commits into this PR only (according to the aforementioned steps) or do I need to make a new PR for the same? Please guide.

@zulipbot
Copy link
Member

zulipbot commented Feb 1, 2022

Hello @Dishti-Oberai, it seems like you have referenced #1133 in your pull request description, but you have not referenced them in your commit message description(s). When you reference an issue in a commit message, it automatically closes the corresponding issue when the commit is merged.

Please run git commit --amend in your command line client to amend your commit message description with Fixes #1133..

An example of a correctly-formatted commit:

commit fabd5e450374c8dde65ec35f02140383940fe146
Author: zulipbot
Date:   Sat Mar 18 13:42:40 2017 -0700

    pull requests: Check PR commits reference when issue is referenced.

    Fixes #51.

Thank you for your contributions to Zulip!

@Dishti-Oberai Dishti-Oberai force-pushed the NewBranch branch 6 times, most recently from 84fc030 to 5726858 Compare February 2, 2022 07:35
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.

@Dishti-Oberai This is clearer and definitely in the right direction, but note that it's clear the two commits were previously together, since they're not independent. If you're on this branch and checkout the commit above (eg. HEAD~, or do an interactive rebase and step through commits), then you'll see you can't run ZT at that point, and tests also fail.

zulipterminal/themes/colors_gruvbox.py Outdated Show resolved Hide resolved
zulipterminal/themes/colors_gruvbox.py Outdated Show resolved Hide resolved
zulipterminal/themes/colors_gruvbox.py Outdated Show resolved Hide resolved
zulipterminal/themes/THEME_CONTRIBUTING.md Outdated Show resolved Hide resolved
zulipterminal/config/themes.py Outdated Show resolved Hide resolved
zulipterminal/config/themes.py Show resolved Hide resolved
zulipterminal/themes/colors_gruvbox.py Outdated Show resolved Hide resolved
tests/config/test_themes.py Outdated Show resolved Hide resolved
zulipterminal/themes/gruvbox_light.py Outdated Show resolved Hide resolved
zulipterminal/themes/gruvbox_light.py Outdated Show resolved Hide resolved
@Dishti-Oberai Dishti-Oberai force-pushed the NewBranch branch 3 times, most recently from 5726858 to 0ce1eff Compare February 4, 2022 04:20
@zulipbot zulipbot added size: L [Automatic label added by zulipbot] and removed size: XL [Automatic label added by zulipbot] labels Feb 4, 2022
@Dishti-Oberai Dishti-Oberai force-pushed the NewBranch branch 2 times, most recently from 206b949 to 46e8d16 Compare February 4, 2022 10:07
@zulipbot zulipbot added size: XL [Automatic label added by zulipbot] and removed size: L [Automatic label added by zulipbot] labels Feb 4, 2022
@Dishti-Oberai Dishti-Oberai force-pushed the NewBranch branch 2 times, most recently from fe4450c to 9060f4e Compare February 4, 2022 17:57
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.

@Dishti-Oberai This is much cleaner, with a few outstanding issues.

Whether themes should aim to work in 16 colors is perhaps something we can discuss in the stream, but we can't just define new names.

I'd suggest you install gitlint and read the commit style section.

zulipterminal/themes/gruvbox_dark.py Outdated Show resolved Hide resolved
zulipterminal/themes/colors_gruvbox.py Outdated Show resolved Hide resolved
zulipterminal/config/themes.py Outdated Show resolved Hide resolved
zulipterminal/themes/gruvbox_light.py Outdated Show resolved Hide resolved
zulipterminal/themes/colors_gruvbox.py Outdated Show resolved Hide resolved
@neiljp neiljp added PR ready to be merged PR has been reviewed & is ready to be merged and removed PR awaiting update PR has been reviewed & is awaiting update or response to reviewer feedback labels Feb 19, 2022
@neiljp neiljp merged commit ffc4df2 into zulip:main Feb 19, 2022
@neiljp
Copy link
Collaborator

neiljp commented Feb 19, 2022

@Dishti-Oberai Thanks for getting this done; I did a final review before merging just now 🎉

we can look at the reordering and generally tidying the gruvbox styling further if you'd like, as we discussed. I removed the change to gruvbox_dark since it seems OK as it is for now, and also the THEME_ALIASES change, since they are old theme names that we're still keeping working (#648).

Note that I also adjusted the commit text style to match the style we use, which is why I suggested installing gitlint previously.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: colors/styles/themes PR ready to be merged PR has been reviewed & is ready to be merged size: XL [Automatic label added by zulipbot]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TRACKING: Support more Themes
4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy