Adding tag descriptions to tooltips#2612
Conversation
Signed-off-by: sharpd <number6labs@gmail.com>
Signed-off-by: sharpd <number6labs@gmail.com>
Codecov Report
@@ Coverage Diff @@
## main #2612 +/- ##
=========================================
Coverage 83.31% 83.31%
Complexity 1289 1289
=========================================
Files 243 243
Lines 5940 5940
Branches 280 280
=========================================
Hits 4949 4949
Misses 844 844
Partials 147 147 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Signed-off-by: sharpd <number6labs@gmail.com>
| useEffect(() => { | ||
| run && fetchJobFacets(run.id) | ||
| fetchTags() | ||
| }, []) |
There was a problem hiding this comment.
This depends on the run You'll want to rerun this if the run changes.
|
|
||
| // tags | ||
| export const FETCH_TAGS = 'FETCH_TAGS' | ||
| export const FETCH_TAGS_SUCCESS = 'FETCH_TAGS_SUCCESS' No newline at end of file |
There was a problem hiding this comment.
I think you've got a few newline issues. The project has a formatter that should help you in your IDE.
| <> | ||
| {tags.map((tag, index) => { | ||
| const tagDescription = tag_desc.find((tagItem) => tagItem.name === tag) | ||
| const tooltipTitle = tagDescription ? (tagDescription.description || 'No Tag Description') : 'No Tag Description' |
There was a problem hiding this comment.
You should be able to clean up this ternary to not have the same false clause twice here. You can use the ? syntax at the end of object properties.
Signed-off-by: sharpd <number6labs@gmail.com>
| useEffect(() => { | ||
| run && fetchJobFacets(run.id) | ||
| run && fetchJobFacets(run.id) && fetchTags() | ||
| }, []) |
There was a problem hiding this comment.
I think you would need to add [run] to the dependencies list. An empty list runs on the component mount. I think it should work for you.
There was a problem hiding this comment.
yeah sorry misunderstood what you were saying - rookie error!
Signed-off-by: sharpd <number6labs@gmail.com>
* add tag descriptions to tooltips Signed-off-by: sharpd <number6labs@gmail.com> * remove tag import after linting Signed-off-by: sharpd <number6labs@gmail.com> * remove comments Signed-off-by: sharpd <number6labs@gmail.com> * ran linter over impacted files and changed code based on feedback Signed-off-by: sharpd <number6labs@gmail.com> * add [run] as dependency based on feedback Signed-off-by: sharpd <number6labs@gmail.com> --------- Signed-off-by: sharpd <number6labs@gmail.com> Co-authored-by: sharpd <number6labs@gmail.com>
Problem
Currently tags displayed at the column level show the tag but not the description which can help the end user understand what the tag means
Closes: #2611
Solution
Get the tag descriptions from the tags end point and when a column has a tag display the corresponding description on hover over.(https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue) for context.
One-line summary:
add hover over to each column level tag which displays the tag description.
Checklist
CHANGELOG.md(Depending on the change, this may not be necessary)..sqldatabase schema migration according to Flyway's naming convention (if relevant)