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

Fix button text and dismissible not showing for announcements #47833

Merged
merged 6 commits into from
Sep 8, 2022

Conversation

dmcavoy
Copy link
Contributor

@dmcavoy dmcavoy commented Aug 26, 2022

Dan reported that the button text was showing in the preview on the unit edit page but not on the unit overview page. (slack) . I traced this back to when we set up the redux store for announcements. I did not update the add announcements in my last PR to account for the new fields.

I tested it locally and now the fields are reflected on the Unit Overview page.
Screen Shot 2022-08-26 at 10 33 54 AM
Screen Shot 2022-08-26 at 10 33 41 AM

Links

https://codedotorg.atlassian.net/browse/PLAT-1946

Testing story

  • Local testing

@dmcavoy dmcavoy requested a review from a team August 26, 2022 14:35
announcement.visibility
announcement.visibility,
announcement.dismissible,
announcement.buttonText
Copy link
Member

Choose a reason for hiding this comment

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

this is quite a lot of positional arguments. you could reduce the risk of error here by using object destructuring in the method definition:

export const addAnnouncement = ({
  notice,
  details,
  link,
  type,
  visibility,
  dismissible,
  buttonText
}) => ({
store.dispatch(addAnnouncement(announcement))

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh cool! Ya I'll do that

@dmcavoy dmcavoy merged commit f11b9cc into staging Sep 8, 2022
@dmcavoy dmcavoy deleted the announcement-error branch September 8, 2022 15:35
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.

None yet

2 participants