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

Prototype of symbol messages #3

Closed
wants to merge 28 commits into from

Conversation

phated
Copy link

@phated phated commented Mar 10, 2024

@sttk I had an idea this week on an alternative way to provide translations and theming.

This idea will emit symbols via gulplog. These symbols will go in a package like @gulpjs/messages and users can provide a function that handles messages. This also means that users could intercept explicit string messages (if they desire) that come from plugins, etc.

I'm prototyping it against your branch this weekend and I will be interested to get your feedback.

@sttk
Copy link
Owner

sttk commented Mar 10, 2024

@phated Your idea is very interesting, but there are some concerns.

  1. There are cases that having to provide a plugin to change messages or styles would be burdensome. Some users might want to change only colors of certain words in certain messages against the background color of their terminal. (In fact, I consider that this case is the most important request regarding this theming feature.) It should be possible to change colors with minimal effort. As an addition to your idea, it can be considered to enable to override the getMessage function in a config file, but the config file would be limited to .js file only.

  2. fancy-log always outputs the timestamp at the beginning of the line, and its color or format cannot be changed. There are indeed requests in the issues for changing the color against the terminal background color, so we need to provide the solution for this.

  3. There are cases that CLI options —color and —no-color would not be supported if the external plugin uses a coloring module other than chalk.

  4. In the draft version, the help messages and task tree are not configurable. For these as well, I believe it's necessary to make it possible to change the colors at least against the terminal's background color.

@phated
Copy link
Author

phated commented Mar 10, 2024

@sttk thank you for the feedback! I will consider all of these concerns as I continue.

@phated
Copy link
Author

phated commented Mar 17, 2024

Closing this, as I opened the full PR as gulpjs#260 and answered the concerns in that thread.

@phated phated closed this Mar 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants