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

feat(dialog, side-drawer): add cancel event (VIV-1899) #1869

Merged
merged 10 commits into from
Oct 10, 2024

Conversation

RichardHelm
Copy link
Contributor

No description provided.

Copy link

codecov bot commented Aug 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (d61b119) to head (2f487d3).
Report is 1106 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##              main     #1869     +/-   ##
===========================================
  Coverage   100.00%   100.00%             
===========================================
  Files          123       350    +227     
  Lines         1562      6840   +5278     
  Branches       108       887    +779     
===========================================
+ Hits          1562      6840   +5278     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@RichardHelm RichardHelm force-pushed the VIV-1899-cancel-event branch from 4728999 to 263f738 Compare August 1, 2024 16:42
TaylorJ76
TaylorJ76 previously approved these changes Aug 12, 2024
Copy link
Contributor

@YonatanKra YonatanKra left a comment

Choose a reason for hiding this comment

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

Thanks for that.
Some minor changes

libs/components/src/lib/dialog/README.md Show resolved Hide resolved
@@ -72,7 +65,7 @@ export const DialogTemplate: (
return html<Dialog>`
<${elevationTag} dp="8">
<dialog class="${getClasses}"
@keydown="${(x, c) => handleEscapeKey(x, c.event)}"
@keydown="${(x, c) => x._onKeyDown(c.event as KeyboardEvent)}"
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove _onKeyDown from the class and create a local template function.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As with the others, I think all logic should go into the class

Copy link
Contributor

@YonatanKra YonatanKra Sep 18, 2024

Choose a reason for hiding this comment

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

After we saw how things can go wrong in the Dialog, I think we can safely revert to our own coding standards and remove the _ to prevent bad interface leaks to production. WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Mhm, I still think it's best to have the method on the class so I'm unwilling to change it.
It would be confusing if some methods are on the class and some defined in the template. The only reason to do so is to avoid _, but as you know, I don't see a problem with it

libs/components/src/lib/dialog/dialog.ts Show resolved Hide resolved
libs/components/src/lib/dialog/dialog.ts Show resolved Hide resolved
libs/components/src/lib/side-drawer/README.md Show resolved Hide resolved
Copy link
Contributor

@YonatanKra YonatanKra left a comment

Choose a reason for hiding this comment

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

Mostly the tests comments.

libs/components/src/lib/dialog/dialog.spec.ts Outdated Show resolved Hide resolved
libs/components/src/lib/dialog/dialog.spec.ts Outdated Show resolved Hide resolved
libs/components/src/lib/dialog/dialog.spec.ts Outdated Show resolved Hide resolved
libs/components/src/lib/side-drawer/side-drawer.spec.ts Outdated Show resolved Hide resolved
@RichardHelm RichardHelm merged commit dde379c into main Oct 10, 2024
15 checks passed
@RichardHelm RichardHelm deleted the VIV-1899-cancel-event branch October 10, 2024 09:55
@github-actions github-actions bot mentioned this pull request Oct 10, 2024
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