-
Notifications
You must be signed in to change notification settings - Fork 189
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
Closes Issue #77. Adds dark theme and modified dependent files. #1414
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also is there a way an user can chose to toggle this feature? |
Hi @agarcia-caicedo! Thank you for the feedback! I just had a few questions/comments: For the light themes, I was using the current colors in the main branch. The site that you mentioned, uses: #00233a, #e5e5e5, #4f96d8 and #a4d4ff, should I update the light theme colors to these? For the dark themes, I see you guys chose: #303030, #a4c8e9, #121212 and #4f96d8. I was experimenting with some alternatives but didn't consider the contrast issues. Should I revert to the ones listed here? There might be some issues regarding certain things like the hyperlinks, active and visited. I currently chose "pink" for dark and "purple" for light. Please let me know if there are better choices. I was debating as to whether adding the switch but it would impact a bit more code. Should I add a switch? This would likely modify the Header component in the |
@abhaseen don't worry about the light theme, we decided against that theme, and decided to use the ones we currently have in these docs. Sorry this all a bit all over the place. You should probably use the suggested colors, as we did test them for contrast. We can always change them, but as a base its a good start. For hyperlinks, we probably want to reuse the same blue as the scroll button. That means #0589D6 in light mode and #a4c8e9 in dark mode. We haven't had much luck introducing additional hues. For the switch, I'm ok with opening another issue to implement it. We do need to decide how that would look in terms of design too, since there's different ways to go about it. What do you think @humphd? |
Hi @agarcia-caicedo ! As requested, I have made the necessary changes. Things That Were Added in the Latest Commit
Important changes to color schemes:The original color in the "Light Theme" that was being used for the post titles based on the scheme you had linked me to was using: Now, for the links in the light theme, there was also a contrast issue. The original color that was being used was also #0589D6. As suggested by Google Chrome Dev Tool, I changed to #034e7a. See images below: And here are the link colors for visited websites: Also here's what the button looks like: As for the button method, there is a drawback: it does not persist with the session, it will reset to light theme by default upon refresh. |
This needs a rebase for conflicts in src/frontend/src/components/SearchBar/SearchBar.jsx |
As @humphd, this needs a rebase, and please don't merge master into your branch: |
Accidentally approved, rebase needs to happen, but I do like the changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove unnecessary import and variable Fix a linter error
Fix issue-1424 : Fix colours in GitHub Contributor component
Fix issue-1271 : Add BackToTopButton in searchPage
I don't know enough about theming to answer this, except to say that I'd like to do what's going to work for our stack: Next.js, TypeScript, and Material-UI. Whatever those three want, that's what we need to do. |
@abhaseen : I might have to ask you to switch your theme.js file to its previous state and if make any changes, please refer to the MUI theming structure that I have included in one of the comments. The sooner you can resolve this, the sooner we can port theming to NextJS |
Hi @tonyvugithub ! Sorry I haven't been replying, I just wanted to let everyone know I'm still working on this, but I won't be able to push any meaningful updates for the next couple of weeks (due to exams, I kind of want to give this my undivided attention). Just a brief question: for the customs themes that I implemented, would you want me to follow the scheme similar to what you have posted? I had seen you do some work in PR #1386 , so I just wanted to know if I should work with those files that have been set up. Please let me know, thanks! |
@abhaseen : hi, it would be easier for porting if your theme can follow the same structure that I have in my issue. Later on we can come back to this and adjust. During the posting process, it is better to stick to the default option as much as possible. And if you can adjust your issue the same as my PR then it is even better. I really appreciate your cooperation. Thank you and good luck with your exams. |
@abhaseen Hi! Thank you for the great work 👍 Telescope team is handling the open PRs for the upcoming release. In that case, we need to know if you're still working on this PR. We're happy to see you continue the work; but if you don't want to keep working on it, we would like to be informed and will be assigning this PR to other team members. |
@yuanLeeMidori , yes, I am still working on it, sorry I've been a bit behind on releases because I've been occupied with other projects, but I do plan on doing one more push soon. |
@abhaseen no worries, we just need to know if you're still working on it. Please reach out on Slack if you need any help :) |
@abhaseen : Thanks for your interest to continue. We decided to push this to 1.6 release and skip it for 1.5 release since the files have changed and we want to finished the migration to Next first before making any changes to the styling or components. We keep you posted on the progress. Thanks again |
Hi. So after working on this for a while and while I was doing the rebase, I realized that there are too many frustrating manual edits to make since the last updates. My suggestion going forward for anyone who wants to take this up would be to create a new PR. The themeing and colors should be used for reference. But the code is a bit too all over the place in comparison to the current state of the code as of Update v.1.5. I think it would be best if I hand this off to someone who is more familiar with the Next.JS coding that's been done since the last several updates. Sorry I could not see this through. I wish you all the best of luck in moving this forward. |
Closed in favour of #1637 |
Issue This PR Addresses
Closes #77
Type of Change
Description
Things that were done:
theme.js
fromtelescope/src/frontend/src/
intoTopLayout.js
intelescope/src/frontend/plugins/gatsby-plugin-top-layout
. This was done in order to be able to use variables to determine the colors based on a light or dark preference.This determines the color scheme being used by the user preference in the browser/device. If a preference cannot be found, it will default to using a light theme.
telescope-post-content.css
intelescope/src/frontend/src/components/Post
intoPost.jsx
in the same folder. This was in order to use the classtelescopePostContent
which will allows us to utilize the variables for dynamic theming.How it looks:
Here are the screenshots of how it looks like:
This is the desktop view for the Dark Mode Scheme
This is the mobile view for the Dark Mode Scheme
This is the mobile view with the Navbar visible (from the hamburger menu)
This is the default light theme for desktop
This is the mobile light theme
This is the mobile light theme with the navbar visible.
Checklist