Skip to content

Tags to show which subsystem a patch is targeting #67

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

Open
destrex271 opened this issue Apr 22, 2025 · 0 comments
Open

Tags to show which subsystem a patch is targeting #67

destrex271 opened this issue Apr 22, 2025 · 0 comments

Comments

@destrex271
Copy link
Contributor

Hi Team!

This might come in as a naive issue but I think that having tags related to the specific subsystem which a patch targets will be really helpful.

Although the current categorizations of Bugs, Clients etc do a great job but when we talk about specific patches, it would be really helpful if we can provide a tag highlighting the subsystem the patch majorly targets(eg: planner, optimizer, storage etc..)

There are certain edge cases where a patch might not fit within a set tag but this feature can really help in making it easier to understand the context of the patch for reviewers.

JelteF added a commit that referenced this issue Jun 16, 2025
A Tag is an arbitrary label for a patch in the Commitfest UI. Other than
helping users identify patches of interest, it has no other semantic
meaning to the CF application. This addresses #11 and #67.

Tags are created using the administrator interface. They consist of a
unique name and a background color. The color should be sent from
compliant browsers in `#rrggbb` format, which is stored without backend
validation; to avoid later CSS injection, any non-conforming values are
replaced with black during rendering.

It also includes some javascript to help admins pick colors that aren't
completely eye-gouging, by putting up an (ignorable) warning if we don't
meet baseline [WCAG
recommendations](https://www.w3.org/WAI/WCAG22/Techniques/general/G18.html)
on text contrast.

## Notes

- To avoid putting a separate name+color copy of every tag into each row
of the `patchlist` query, I instead grab the tag IDs and look them up in
a map at render time. I think this requires `@transaction.atomic` to tie
the map and patches together, which I've added across the entire view
for simplicity.
- Backend validation for the color didn't make a whole lot of sense to
me, since only admins can create tags and we escape at time-of-use
anyway.

## Screenshots
Admin interface:

![image](https://github.com/user-attachments/assets/8061a2d1-1d5b-456b-99bb-4af5d6dc79fc)
User interface:

![image](https://github.com/user-attachments/assets/9c95b307-c6e2-48c8-bd65-881c08429a96)

---------

Co-authored-by: Jelte Fennema-Nio <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant