-
Notifications
You must be signed in to change notification settings - Fork 916
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 HeaderControl not rendered if not mount in initial rendering #8335
Merged
ruanyl
merged 9 commits into
opensearch-project:main
from
wanglam:fix-header-control-not-rendered
Sep 27, 2024
Merged
Fix HeaderControl not rendered if not mount in initial rendering #8335
ruanyl
merged 9 commits into
opensearch-project:main
from
wanglam:fix-header-control-not-rendered
Sep 27, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Lin Wang <[email protected]>
Signed-off-by: Lin Wang <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8335 +/- ##
==========================================
- Coverage 64.14% 60.95% -3.19%
==========================================
Files 3743 3744 +1
Lines 88849 88854 +5
Branches 13856 13857 +1
==========================================
- Hits 56993 54164 -2829
- Misses 31241 31380 +139
- Partials 615 3310 +2695
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
wanglam
requested review from
ananzh,
kavilla,
AMoo-Miki,
ashwin-pc,
joshuarrrr,
abbyhu2000,
zengyan-amazon,
zhongnansu,
manasvinibs,
ZilongX,
Flyingliuhub,
curq,
bandinib-amzn,
SuZhou-Joe,
ruanyl,
BionIT,
xinruiba,
zhyuanqi,
mengweieric and
LDrago27
as code owners
September 26, 2024 08:45
wanglam
requested review from
virajsanghvi,
sejli,
joshuali925 and
huyaboo
as code owners
September 26, 2024 08:45
Signed-off-by: Lin Wang <[email protected]>
ruanyl
previously approved these changes
Sep 26, 2024
Co-authored-by: Yulong Ruan <[email protected]> Signed-off-by: Lin Wang <[email protected]>
AMoo-Miki
approved these changes
Sep 26, 2024
ruanyl
approved these changes
Sep 27, 2024
opensearch-trigger-bot bot
pushed a commit
that referenced
this pull request
Sep 27, 2024
* Add useObservableValue hook Signed-off-by: Lin Wang <[email protected]> * Fix header control not render when not mount in initial rendering Signed-off-by: Lin Wang <[email protected]> * Changeset file for PR #8335 created/updated * Import useObservable from lib folder Signed-off-by: Lin Wang <[email protected]> * Change to useObservable for non function observable object Signed-off-by: Lin Wang <[email protected]> * Update src/core/public/utils/use_observable_value.ts Co-authored-by: Yulong Ruan <[email protected]> Signed-off-by: Lin Wang <[email protected]> --------- Signed-off-by: Lin Wang <[email protected]> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> Co-authored-by: Yulong Ruan <[email protected]> (cherry picked from commit 8691010) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
ruanyl
pushed a commit
that referenced
this pull request
Sep 30, 2024
SuZhou-Joe
pushed a commit
to SuZhou-Joe/OpenSearch-Dashboards
that referenced
this pull request
Oct 3, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR is for fixing
HeaderControl
not rendered if not mount in initial rendering. The original implementation rely on controls registered toapplication.currentRightControls$
beforeHeader
component rendering. This component won't re-render after new value emitted inapplication.currentRightControls$
. This PR add a newuseObservableValue
to subscribe these controls updates. It will fire re-render after these observable emit new values.Issues Resolved
#8313
Screenshot
This is a bug fix, no UI changes.
Testing the changes
yarn osd bootstrap --single-version loose
config/opensearch_dashboards.yml
yarn start --no-base-path
Changelog
Check List
yarn test:jest
yarn test:jest_integration