WIP: feat(default theme): add default color theme based on terminal
this is only a suggestion test it out yourself and adjust the colors as you like the palette is limited with only the default terminal colors terminal (16 bit for max compatability)
Summary by CodeRabbit
- New Features
- Introduced a new code syntax highlighting theme based on the popular "dracula" style, offering refined color settings for various interface components and states to enhance visual consistency.
Thanks I will try it out later
By the way, FYI we have an active discord(see ReadMe.md) . You can join that for more flexible discussion with spf team, and see whats else is being worked on.
Walkthrough
A new configuration file, ansi-default.toml, has been added to define a "dracula" code syntax highlighting theme. The file specifies color settings for various UI elements such as borders, backgrounds, and foregrounds as well as active states and indicators like cursors and error highlights. This configuration extends the application's theming capabilities without altering existing control flows.
Changes
| File | Summary |
|---|---|
| src/superfile_config/theme/ansi-default.toml | Added a new configuration file defining a "dracula" syntax highlighting theme with color settings for borders, backgrounds, foregrounds, and UI-specific elements. |
Poem
I'm a rabbit with a cheerful grin,
Hopping through colors where ideas begin.
A "dracula" theme now lights the night,
With hues so vibrant, pure delight.
Carrot dreams and codes unite!
🥕✨
📜 Recent review details
Configuration used: CodeRabbit UI Review profile: CHILL Plan: Pro
📥 Commits
Reviewing files that changed from the base of the PR and between 4bebbe2bac4c8a5612fee74e37b51ed2cc2f81a5 and 4e665194ef76c0b7bc1fe8061ea9bb823df76bdf.
📒 Files selected for processing (1)
src/superfile_config/theme/ansi-default.toml(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- src/superfile_config/theme/ansi-default.toml
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
🪧 Tips
Chat
There are 3 ways to chat with CodeRabbit:
- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
I pushed a fix in commit <commit_id>, please review it.Generate unit testing code for this file.Open a follow-up GitHub issue for this discussion.
- Files and specific lines of code (under the "Files changed" tab): Tag
@coderabbitaiin a new review comment at the desired location with your query. Examples:@coderabbitai generate unit testing code for this file.@coderabbitai modularize this function.
- PR comments: Tag
@coderabbitaiin a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.@coderabbitai read src/utils.ts and generate unit testing code.@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.@coderabbitai help me debug CodeRabbit configuration file.
Support
Need help? Create a ticket on our support page for assistance with any issues or questions.
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.
CodeRabbit Commands (Invoked using PR comments)
@coderabbitai pauseto pause the reviews on a PR.@coderabbitai resumeto resume the paused reviews.@coderabbitai reviewto trigger an incremental review. This is useful when automatic reviews are disabled for the repository.@coderabbitai full reviewto do a full review from scratch and review all the files again.@coderabbitai summaryto regenerate the summary of the PR.@coderabbitai generate docstringsto generate docstrings for this PR.@coderabbitai generate sequence diagramto generate a sequence diagram of the changes in this PR.@coderabbitai resolveresolve all the CodeRabbit review comments.@coderabbitai configurationto show the current CodeRabbit configuration for the repository.@coderabbitai helpto get help.
Other keywords and placeholders
- Add
@coderabbitai ignoreanywhere in the PR description to prevent this PR from being reviewed. - Add
@coderabbitai summaryto generate the high-level summary at a specific location in the PR description. - Add
@coderabbitaianywhere in the PR title to generate the title automatically.
CodeRabbit Configuration File (.coderabbit.yaml)
- You can programmatically configure CodeRabbit by adding a
.coderabbit.yamlfile to the root of your repository. - Please see the configuration documentation for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation:
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
Documentation and Community
- Visit our Documentation for detailed information on how to use CodeRabbit.
- Join our Discord Community to get help, request features, and share feedback.
- Follow us on X/Twitter for updates and announcements.
should i close this up or is this still a thing?
This will get merged. Was busy in other things. Will take this up and pending PRs soon
Right now, I am focussing on getting this done and merged to main
- https://github.com/yorukot/superfile/pull/775
This will get merged. Was busy in other things. Will take this up and pending PRs soon
no worries, take your time 😄
@nkxxll "add default color theme based on terminal" - Does this mean if my terminal is in light mode, spf should open in light mode ? I didn't observe it work like that.
Also some colors looks off
Process bar color is not visible
Directory icon color is black, and background is also black, making it invisible
And image preview breaks when I use this theme
I try to look into it today...
And image preview breaks when I use this theme
yes done that pr before image preview was a thing the image preview takes the hex codes and does something with them my hacky trick here is to take ansi codes instead of hex codes because bubble tea has an api that takes either one of the formats and this leads to it working fine...
have to find an fix here but it might be better to just not hack the way into using the double api on bubble tea and instead find the default colors of the terminal some other way
switched the colors a bit now it looks a bit better but light theme needs another set of colors which would also better be solved with software instead of config because you would need a light and a dark theme
@nkxxll
Just add a screenshot and add it to the list of themes in website code. Something like this - https://github.com/yorukot/superfile/commit/900af6805896846be8ff83ac5138cacd752f4b4f
@nkxxll To prevent theme issues, we are adding these instruction for theme PRs.
Please add these screenshots in the PR, to make sure that the theme doesn't have any issues
- Full view of superfile (Including sidebar, file previewer, process panel, metadata panel, and clipboard panel )
- Make sure that file previewer is non empty, process panel has at least one process, and clipboard has at least one entry
- Add a screenshot of these individual panel being focussed (To make sure border focus color is good)
- Sidebar
- Processbar
- Add a screenshot of help menu (Press
?) - Add a screenshot of popup that opens when you create a new file (
Ctrl+n) - Add a screenshot of image being preview using your theme.
- Add a screenshot of successful and unsuccessful shell command.
Example
- Full view of superfile (Including sidebar, file previewer, process panel, metadata panel, and clipboard panel )
- Make sure that file previewer is non empty, process panel has at least one process, and clipboard has at least one entry
- Add a screenshot of these individual panel being focussed (To make sure border focus color is good)
- Sidebar
- Processbar
-
Add a screenshot of help menu (Press
?) -
Add a screenshot of popup that opens when you create a new file (
Ctrl+n) -
Add a screenshot of image being preview using your theme.
-
Add a screenshot of successful and unsuccessful shell command.
If not reverted back by 15th July, this PR will be considered stale and closed.