Skip to content

Refactoring and simplifying CQA table, updating icons - #51303

Merged
hannahbergam merged 2 commits into
stagingfrom
hbergam/icon-switch
Apr 13, 2023
Merged

Refactoring and simplifying CQA table, updating icons#51303
hannahbergam merged 2 commits into
stagingfrom
hbergam/icon-switch

Conversation

@hannahbergam

@hannahbergam hannahbergam commented Apr 12, 2023

Copy link
Copy Markdown
Contributor

This pr covers three updates. I did them together because they're all small and cover the same area.

  1. Makes sure that clicking 'decide later' clears out the selected course offering (which makes the version and unit dropdowns disappear)- a fix!
  2. Updates the icons to be right unless selected, then pointing down if selected to match advanced settings
  3. Updates the marketing audience selectors to collapse the table if pressed again
  4. (3A) Refactors the icon and onClick functions to be shared to avoid repeating code

New icon status:
Screenshot 2023-04-12 at 1 25 54 PM

Links

Testing story

Deployment strategy

Follow-up work

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

updateSection('course', {});
if (marketingAudience !== '') {
setMarketingAudience('');
setSelectedCourseOffering(null);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is (1) from PR description

marketingAudience,
updateMarketingAudience
}) {
// Determines which icon to render for each audience

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is (3A)

}) {
// Determines which icon to render for each audience
const marketingAudienceIcon = audience => {
return marketingAudience === audience ? 'caret-down' : 'caret-right';

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is (2)

// Otherwise, set to this audience
const determineMarketingAudience = newAudience => {
if (newAudience === marketingAudience) {
updateMarketingAudience('');

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is (3)

@hannahbergam
hannahbergam requested review from a team, kobryan0619 and tess323 April 12, 2023 20:38

@rshipp rshipp 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.

lgtm!

@hannahbergam
hannahbergam merged commit 011922d into staging Apr 13, 2023
@hannahbergam
hannahbergam deleted the hbergam/icon-switch branch April 13, 2023 20:23
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.

2 participants