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
configure background and foreground color for custom fields #1552
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.
Thanks @fcaspar for your contribution
Some general remarks, some more following inline
- conflicts with latest code have to be resolved
- missing documentation in Admin Guide
- why do you use color_background / color_foreground instead of the usual background_color / foreground_color?
- the colors are not applied to the
View Issues
page, maybe even more (didn't check) - we use different colors for field labels and field values. After your change, they are the same.
Not sure, if this should be changed (use the same color or add two more options) - usage of inline styles
Inline styles should be avoided.
At the moment we allow them, but it will not work any longer if CSP headers should be changed back to what we had in Mantis 1.3
https://mantisbt.org/bugs/view.php?id=21908
Would be good to get some feedback of other devs if introducing some more inline styles should be allowed
schema update changed to 7 char null and correct table name
Thanks for reviewing. ;)
Is that a task for me? Could you please clarify?
Please recheck other points. If they are fine, I'll update documentation.
Changed.
I edited only bug_view_inc to consider the colors. Did I miss something?
Correct. Open point.
Inline Styles: I have no other idea how to affect a field's style individually. Do you have a suggestion? |
It seems something that went wrong with your latest changes. Please make sure that your submissions adhere to our Coding Guidelines http://www.mantisbt.org/wiki/doku.php/mantisbt:coding_guidelines
Typically yes.
Not changed in schema.php
Custom fields can also be displayed on "View Issues" page if they are included via columns configuration.
It could be implemented similar to the status color, but I am not sure if it's worth the effort. @dregad @vboctor what's your opinion concerning usage of inline styles ? |
-1 - I am strongly against this change for the following reasons:
|
@syncguru I am also not 100% convinced that the current approach of the PR is what should be included in standard.
Right, in best case default fields are nothing more than preconfigured custom fields.
We allow random colors for status squares. We can't prevent users from changing whatever they want. Keep also in mind that there are users that don't like the ACE theme / colors due to various reasons. So in best case we offer different themes and some more predefined colors to choose for other purposes, e.g. coloring of (custom) fields.
+1 that's why I opened https://mantisbt.org/bugs/view.php?id=21908
It's not that unusual in Mantis. We allow storing status colors in configuration file and DB. |
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.
-1 from me as well.
As a goal, it would be good to reduce the gap between features of custom vs. native fields. For example, interleaving and ordering of native and custom fields, making a native field required, etc. Hopefully overtime, we will get there.
As for UX, we should limit the degrees of freedom customizations promise to enable control over the full UX. For example, in tools like Slack/Teams, a color can be assigned to a message, but it doesn't change foreground and background image, but it shows a bar next to the message to control the experience, similar to our status color approach. This way, UX can change overtime, themes can change (e.g. dark mode vs. standard mode), etc.
Closed based on feedback of other devs. For other users that might think about using these changes on their own Mantis instance: |
https://mantisbt.org/bugs/view.php?id=26080
https://mantisbt.org/forums/viewtopic.php?f=9&p=68706