Skip to content

Add labels to Curriculum Catalog Card - #51304

Merged
megcrenshaw merged 17 commits into
stagingfrom
meg/add-tag-styling-curriculum-card
Apr 19, 2023
Merged

Add labels to Curriculum Catalog Card#51304
megcrenshaw merged 17 commits into
stagingfrom
meg/add-tag-styling-curriculum-card

Conversation

@megcrenshaw

@megcrenshaw megcrenshaw commented Apr 12, 2023

Copy link
Copy Markdown

This PR does two things:

  1. Adds new tag styling as indicated in the Redline. Instructions on what to do on overflow are in this thread. I did need to make the cards longer to accommodate the extra space needed for the tags.
  2. Ensures tags are in the ordered specified in the product spec.

From Redline:
image

On webpage:
image

Two-line title:
image

No topics or subjects (no picture loaded yet):
image

Ellipse:
image

Non-English:
image

With hover (but will update to use Tooltip):
https://user-images.githubusercontent.com/9142121/232040244-051289df-e7af-40bd-972a-aa5c5fe59e15.mov

Links

Testing story

Deployment strategy

Follow-up work

Tooltip on hover for both the first tag and the remaining tags: https://codedotorg.atlassian.net/browse/ACQ-524

Privacy

Security

Caching

PR Checklist:

  • Tests provide adequate coverage
  • Privacy and Security impacts have been assessed
  • Code is well-commented
  • New features are translatable or updates will not break translations
  • Relevant documentation has been added or updated
  • User impact is well-understood and desirable
  • Pull Request is labeled appropriately
  • Follow-up work items (including potential tech debt) are tracked and linked

@megcrenshaw
megcrenshaw force-pushed the meg/add-tag-styling-curriculum-card branch from c3c7ca7 to d3bb661 Compare April 14, 2023 02:20
@megcrenshaw
megcrenshaw marked this pull request as ready for review April 14, 2023 12:21
@megcrenshaw
megcrenshaw requested review from a team and kelbyhawn and removed request for a team and kelbyhawn April 14, 2023 12:21
@megcrenshaw
megcrenshaw marked this pull request as draft April 14, 2023 13:54
@megcrenshaw

Copy link
Copy Markdown
Author

Need to change the hover styling ... will re-request once that's implemented

@megcrenshaw

Copy link
Copy Markdown
Author

Implementing the tooltip is going to require more work to make it accessible. I'm splitting that out into a separate ticket because this PR is big enough. https://codedotorg.atlassian.net/browse/ACQ-524

@megcrenshaw
megcrenshaw marked this pull request as ready for review April 14, 2023 19:24
@megcrenshaw
megcrenshaw requested review from a team and kelbyhawn April 14, 2023 19:24
@kelbyhawn

Copy link
Copy Markdown
Contributor

This looks great! Will the tooltip list out all of the topics stacked vertically?

@davidsbailey

Copy link
Copy Markdown
Member

This PR does two things:

  1. Adds new tag styling as indicated in the Redline. Instructions on what to do on overflow are in this thread. I did need to make the cards longer to accommodate the extra space needed for the tags.
  2. Ensures tags are in the ordered specified in the product spec.

sorry but what are tags in this context?

@megcrenshaw

megcrenshaw commented Apr 17, 2023

Copy link
Copy Markdown
Author

This looks great! Will the tooltip list out all of the topics stacked vertically?

Yes! The first pass of that looks like (just updated the follow-up work section to make this clear)
image (2)

@megcrenshaw

megcrenshaw commented Apr 17, 2023

Copy link
Copy Markdown
Author

This PR does two things:

  1. Adds new tag styling as indicated in the Redline. Instructions on what to do on overflow are in this thread. I did need to make the cards longer to accommodate the extra space needed for the tags.
  2. Ensures tags are in the ordered specified in the product spec.

sorry but what are tags in this context?

Oh yikes! I've just been calling these tags in my head for forever for no real reason. Tags are the blue "bubbles" underneath the image that show a category name –– they could be a subject or a topic from the backend. I'm only using the term tag to describe the styles, but would category be a more clear name here? I hesitate to do that because category is a separate field on the backend.

Another potential follow-up is that on the backend, these fields are called cs_topic and school_subject which is misleading because there could be multiple topics and subjects, formatted as a CSV. Adding some validation here would be nice. Do you think it also warrants a name change to the fields to be clear that there could be multiple?

@davidsbailey

Copy link
Copy Markdown
Member

sorry but what are tags in this context?

Oh yikes! I've just been calling these tags in my head for forever for no real reason. Tags are the blue "bubbles" underneath the image that show a category name –– they could be a subject or a topic from the backend. I'm only using the term tag to describe the styles, but would category be a more clear name here? I hesitate to do that because category is a separate field on the backend.

No worries! in this comment, I was mostly asking to help figure out what I was reviewing before digging in.

having read through a bit, I would suggest either "label", which sounds self-documenting to me, or keeping "tag" and adding a well-placed comment indicating what it means.

Another potential follow-up is that on the backend, these fields are called cs_topic and school_subject which is misleading because there could be multiple topics and subjects, formatted as a CSV. Adding some validation here would be nice. Do you think it also warrants a name change to the fields to be clear that there could be multiple?

if I'm understanding correctly, the change would be to rename these fields to cs_topics and school_subjects on the backend and in the data that gets sent to the client? yes, I think that would be a good idea, while this is still unlaunched and therefore easier to change.

@davidsbailey davidsbailey left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM after adding a brief comment on what a tag is, or please request re-review if doing a bigger change like switching to "label".

@megcrenshaw megcrenshaw changed the title Add tags to Curriculum Catalog Card Add labels to Curriculum Catalog Card Apr 17, 2023
@megcrenshaw
megcrenshaw force-pushed the meg/add-tag-styling-curriculum-card branch from b507c11 to 47ed60d Compare April 18, 2023 13:49
@megcrenshaw

megcrenshaw commented Apr 18, 2023

Copy link
Copy Markdown
Author

LGTM after adding a brief comment on what a tag is, or please request re-review if doing a bigger change like switching to "label".

I like the labels change!

  • change from tag to labels: 5439436
  • Other commits can be seen in the history, but I did rebase due to merge conflicts. I also changed styling to use child selectors rather than classnames (47ed60d), and there was a bug when no labels were present, so I fixed that (cf67a04) and added another story (cb498cd)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not blocking, but I just noticed the non-English stacked buttons height (on line 127) .buttonsContainer_notEnglish doesn't match the English button height — both should be height: 40px.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

This was actually intentional ... if it's larger, the card needs to be even longer to have some space between the grades and the button
image

Here's what it looks like now
image

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I'll ask in the design channel about this!

@megcrenshaw megcrenshaw Apr 18, 2023

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Actually I just made the executive decision to change it with a larger height

image

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice! I think this was the right call 👍

@kelbyhawn kelbyhawn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks great, and I like the tags >> labels change!

@davidsbailey davidsbailey left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

looks great, thanks for updating! just two tiny nits below

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

tag -> label

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

tag -> label

@megcrenshaw
megcrenshaw force-pushed the meg/add-tag-styling-curriculum-card branch from cb498cd to 6e6f786 Compare April 18, 2023 21:08
@megcrenshaw
megcrenshaw merged commit 0cc37cc into staging Apr 19, 2023
@megcrenshaw
megcrenshaw deleted the meg/add-tag-styling-curriculum-card branch April 19, 2023 11:54
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

Successfully merging this pull request may close these issues.

3 participants