Visitar URL original
Create modal changelog item by mahoneycm · Pull Request #2117 · uswds/uswds-site · GitHub
Skip to content

Create modal changelog item - #2117

Merged
amyleadem merged 4 commits into
release-3.7.0from
cm-modal-refactor-changelog
Nov 6, 2023
Merged

amyleadem merged 4 commits into
release-3.7.0from
cm-modal-refactor-changelog

Conversation

@mahoneycm

@mahoneycm mahoneycm commented Jun 1, 2023 •

Copy link
Copy Markdown
Contributor

Summary

For uswds/uswds#5315

Preview link

Preview link:
Modal changelog →

@mahoneycm mahoneycm mentioned this pull request Jun 1, 2023
3 of 7 tasks

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

Added comments on version & date. Otherwise LGTM.

type: component
changelogURL:
items:
- date: NNNN-NN-NN

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.

Noting that we'll need to add date before merge.

Comment thread _data/changelogs/component-modal.yml Outdated
affectsJavascript: true
githubPr: 5315
githubRepo: uswds
versionUswds: 3.5.0

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.

Need to update version before merge.

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

Generally looks good. I added a couple of small suggestions in the comments:

Comment thread _data/changelogs/component-modal.yml Resolved
Comment thread _data/changelogs/component-modal.yml Outdated
Comment on lines +6 to +7
summary: Refactors Modal javascript for added consistency and failsafe measures.
summaryAdditional: This resolves issues when initialization is called more than once on a document.

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.

This is a little clumsy, but wanted to pull in the main user benefit into the top summary.

Suggested change
summary: Refactors Modal javascript for added consistency and failsafe measures.
summaryAdditional: This resolves issues when initialization is called more than once on a document.
summary: Updated JavaScript to prevent issues when modal initialization is called more than once on a document.
summaryAdditional: Additionally improved code consistency and added failsafe measures.

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.

To me, the main "change/improvement" revolves around the failsafe measures, and the JS multi-initialization prevention is a result of that. What do you think of this change?

  summary: Updated JavaScript to include fallbacks and error messages when initialization cannot be completed.
  summaryAdditional: Additionally, this improved code consistency and prevented errors when trying to initialize modal twice.

Or would it be better practice to address the problem statement first like your example?

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.

I like the wording on that update, @mahoneycm. Happy to defer to you about identifying the primary benefit here.

mahoneycm and others added 2 commits July 25, 2023 14:58
Co-authored-by: Amy Leadem <93996430+amyleadem@users.noreply.github.com>
@amyleadem
amyleadem changed the base branch from main to release-3.7.0 October 27, 2023 20:57
@amyleadem
amyleadem merged commit e56b351 into release-3.7.0 Nov 6, 2023
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