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

chore: Add runtime actions discovery to alert and flashbar #1430

Merged
merged 1 commit into from
Aug 11, 2023

Conversation

just-boris
Copy link
Member

Description

Implement new runtime API

Related links, issue #, if available: n/a

How has this been tested?

Added unit tests and dev pages for screenshot tests

Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov
Copy link

codecov bot commented Aug 9, 2023

Codecov Report

Patch coverage: 98.57% and no project coverage change.

Comparison is base (e657a92) 93.57% compared to head (f85db70) 93.58%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1430   +/-   ##
=======================================
  Coverage   93.57%   93.58%           
=======================================
  Files         631      636    +5     
  Lines       16897    16934   +37     
  Branches     5583     5581    -2     
=======================================
+ Hits        15812    15848   +36     
- Misses       1013     1014    +1     
  Partials       72       72           
Files Changed Coverage Δ
...internal/plugins/helpers/use-discovered-action.tsx 93.33% <93.33%> (ø)
src/alert/actions-wrapper/index.tsx 100.00% <100.00%> (ø)
src/alert/internal.tsx 100.00% <100.00%> (ø)
src/app-layout/runtime-api.tsx 100.00% <100.00%> (ø)
src/flashbar/flash.tsx 100.00% <100.00%> (ø)
src/internal/plugins/api.ts 83.33% <100.00%> (+1.51%) ⬆️
src/internal/plugins/controllers/action-buttons.ts 100.00% <100.00%> (ø)
src/internal/plugins/controllers/drawers.ts 100.00% <100.00%> (ø)
...ternal/plugins/helpers/runtime-content-wrapper.tsx 100.00% <100.00%> (ø)
src/internal/plugins/helpers/utils.ts 100.00% <100.00%> (ø)
... and 2 more

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

@just-boris just-boris force-pushed the feat-discovered-actions branch 3 times, most recently from 5aa2832 to 2cf84a6 Compare August 10, 2023 12:53
@just-boris just-boris marked this pull request as ready for review August 10, 2023 16:23
@just-boris just-boris requested a review from a team as a code owner August 10, 2023 16:23
@just-boris just-boris requested review from gethinwebster and removed request for a team August 10, 2023 16:23

@use '../../internal/styles/tokens' as awsui;

.root {
Copy link
Member Author

Choose a reason for hiding this comment

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

This is not a space between component, because runtime plugins require rendering an empty <div> as a mount point and this breaks :empty styling.

In this custom implementation, the wrapper nodes are deduplicated and :empty works again

Comment on lines -21 to -24
if (this.updateTimeout) {
clearTimeout(this.updateTimeout);
}
this.updateTimeout = setTimeout(() => {
Copy link
Member Author

Choose a reason for hiding this comment

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

I have figured that this timeout is basically a debounce implementation and I can reuse our existing one

@just-boris just-boris merged commit e2002cd into main Aug 11, 2023
28 checks passed
@just-boris just-boris deleted the feat-discovered-actions branch August 11, 2023 13:36
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