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: Fix toolbar feature flag detection to only apply in visual refresh mode #2584

Merged
merged 1 commit into from
Aug 21, 2024

Conversation

just-boris
Copy link
Member

Description

Fixed a bug where some toolbar-only changes could leak into the classic design

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

How has this been tested?

Added an integration test

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.

Comment on lines +28 to +30
const page = new GlobalBreadcrumbsPage(browser);
await browser.url(url);
await page.waitForVisible(wrapper.findAppLayout().findContentRegion().toSelector());
Copy link
Member Author

Choose a reason for hiding this comment

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

Extracted this repeating code while adding a new test

import { isAppLayoutToolbarEnabled } from './utils/feature-flags';
import { useAppLayoutToolbarEnabled } from './utils/feature-flags';
Copy link
Member Author

Choose a reason for hiding this comment

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

Since I had to put useVisualRefresh hook, I had to convert this one as a hook too (but it should not count any performance impact, because we do not use any React hooks API internally anyway)

Copy link

codecov bot commented Aug 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.79%. Comparing base (889fdbc) to head (59bcd77).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2584      +/-   ##
==========================================
- Coverage   95.79%   95.79%   -0.01%     
==========================================
  Files         741      741              
  Lines       20285    20293       +8     
  Branches     6898     6898              
==========================================
+ Hits        19432    19439       +7     
- Misses        797      798       +1     
  Partials       56       56              

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

@just-boris just-boris marked this pull request as ready for review August 19, 2024 17:06
@just-boris just-boris requested a review from a team as a code owner August 19, 2024 17:06
@just-boris just-boris requested review from dpitcock and removed request for a team August 19, 2024 17:06
@just-boris just-boris added this pull request to the merge queue Aug 21, 2024
Merged via the queue into main with commit 6989bfe Aug 21, 2024
33 checks passed
@just-boris just-boris deleted the toolbar-flag branch August 21, 2024 09:13
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