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

Add Job tagging to UI #2837

Merged
merged 6 commits into from
Jun 19, 2024
Merged

Add Job tagging to UI #2837

merged 6 commits into from
Jun 19, 2024

Conversation

davidsharp7
Copy link
Member

@davidsharp7 davidsharp7 commented Jun 17, 2024

Problem

Currently we can tag jobs via the API but not in UI.

Closes: #2817

Solution

Screenshot 2024-06-17 at 20 41 36 Screenshot 2024-06-19 at 21 32 53

Copy the basic infrastructure for tagging setting but apply it to the Job Detail page in the UI.

  • add new actions/saga/reducers/request for retrieving/adding and deleting tags via the UI
  • essentially a copy of dataset tags to maintain the look and feel.
  • potentially could be one super component but made a conscious decision to essentially just replicate dataset tags.

One-line summary:

Add job tagging to UI

Checklist

  • You've signed-off your work
  • Your changes are accompanied by tests (if relevant)
  • Your change contains a small diff and is self-contained
  • You've updated any relevant documentation (if relevant)
  • You've included a one-line summary of your change for the CHANGELOG.md (Depending on the change, this may not be necessary).
  • You've versioned your .sql database schema migration according to Flyway's naming convention (if relevant)
  • You've included a header in any source code files (if relevant)

@boring-cyborg boring-cyborg bot added the web label Jun 17, 2024
Copy link

netlify bot commented Jun 17, 2024

Deploy Preview for peppy-sprite-186812 canceled.

Name Link
🔨 Latest commit ae357ee
🔍 Latest deploy log https://app.netlify.com/sites/peppy-sprite-186812/deploys/6672a420980eff00088462f0

Copy link

codecov bot commented Jun 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.74%. Comparing base (bd07b9b) to head (ae357ee).

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #2837   +/-   ##
=========================================
  Coverage     84.74%   84.74%           
  Complexity     1456     1456           
=========================================
  Files           253      253           
  Lines          6562     6562           
  Branches        305      305           
=========================================
  Hits           5561     5561           
  Misses          850      850           
  Partials        151      151           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: sharpd <[email protected]>
@wslulciuc wslulciuc requested a review from phixMe June 18, 2024 18:54
@wslulciuc wslulciuc modified the milestones: 0.49.0, 0.48.0 Jun 18, 2024
Copy link
Member

@wslulciuc wslulciuc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I've added @phixMe as a reviewer to get this merged for our 0.48.0 release.

setTagDescription(selectedTagData ? selectedTagData.description : 'No Description')
}

const handleDescriptionChange = (event: any) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can have an explicit type here, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes good spot.

Comment on lines 78 to 93
case ADD_JOB_TAG:
return {
...state,
}
case ADD_JOB_TAG_SUCCESS:
return {
...state,
}
case DELETE_JOB_TAG:
return {
...state,
}
case DELETE_JOB_TAG_SUCCESS:
return {
...state,
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need any of these, if they just reflect the same state?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yip happy to remove.

const handleTagDescChange = (_event: any, value: string) => {
const selectedTagData = tagData.find((tag) => tag.name === value)
setListTag(value)
setTagDescription(selectedTagData ? selectedTagData.description : 'No Description')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"No description" is kind of a description in and of itself, is this what you want out of this, would you prefer if it was just empty?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that's my data hat talking - can leave blank.

Comment on lines 246 to 248
<MQText subheading bottomMargin>
Description
</MQText>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking we may want to use the label prop on these, maybe it would work a bit better with the design system. I could be wrong.

Copy link
Member

@phixMe phixMe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @davidsharp7 for driving this effort forward!

@davidsharp7
Copy link
Member Author

Always an opportunity to learn more stuff!

@phixMe phixMe merged commit 66e2d7a into main Jun 19, 2024
16 checks passed
@phixMe phixMe deleted the web/add_job_tags_to_ui branch June 19, 2024 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Add Job Tagging to UI
3 participants