-
Notifications
You must be signed in to change notification settings - Fork 923
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
[Rebase #6730 and fix tests] Fix/UI settings overrides #7776
[Rebase #6730 and fix tests] Fix/UI settings overrides #7776
Conversation
This PR is originally from opensearch-project#6730. We simply update the tests. Signed-off-by: Josh Romero <[email protected]>
❌ Invalid PrefixInvalid description prefix. Found "bug". Expected "breaking", "deprecate", "feat", "fix", "infra", "doc", "chore", "refactor", "security", "skip", or "test". |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7776 +/- ##
==========================================
- Coverage 63.83% 63.80% -0.04%
==========================================
Files 3655 3656 +1
Lines 81126 81205 +79
Branches 12923 12949 +26
==========================================
+ Hits 51783 51809 +26
- Misses 26165 26215 +50
- Partials 3178 3181 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
c9a89a3
to
43e8f59
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code changes look good to me, I'm just curious where to find theme:enableUserControl
on the UI? Somehow I couldn't find it in advance settings page.
Signed-off-by: Anan Zhuang <[email protected]>
43e8f59
to
498376f
Compare
@ruanyl @SuZhou-Joe I fixed the last test to make it more robust. Can you guys help me to re-approve it? |
The backport to
To backport manually, run these commands in your terminal: # Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch-Dashboards/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch-Dashboards/backport-2.x
# Create a new branch
git switch --create backport/backport-7776-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 d7d07774add5fcf950244a43630c9ffad68f9678
# Push it to GitHub
git push --set-upstream origin backport/backport-7776-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch-Dashboards/backport-2.x Then, create a pull request where the |
Did you manage to resolve this @ruanyl ? I'm running 2.16 but can't see this under advanced settings either. If I try adding this to my opensearch_dashboards.yaml and restart
Then for me it appears under General (rather than appearance) and doesn't give the same warnings; |
@andy-townsend the To release this feature, we should
|
Decided against backporting. |
Description
This PR is originally from #6730. We simply update the tests.
From #6730 Description
There are a couple different fixes here, which can be viewed separately by looking at the separate commits. But the root cause of #6704 was primarily the fact that the implementation of
getOverridesOrDefault
assumed the wrong object shape for theoverrides
property, when it tried to access avalue
property instead of just the value itself. Note that the existing unit test also had this same error.Because the
ui_render_mixin
is an old legacy.js
file, there's not much help from typescript, so I also added some enforcement to make sure we're always sending boolean values to the template.Additionally, I realized that the validation for the
theme:version
setting was not correct, and needed updating to match our current themes.Finally, as requested, I updated the new user theme controls to be deactivated by default.
No changelog necessary, as the previous PR this fixes has not yet been released.
Future work
@AMoo-Miki @manasvinibs - The past discussion and this TODO comment seem to indicate that we don't actually want to maintain support for these overrides long term. But even if we do, I don't think the schema definition for overrides makes much sense:
We probably want users to be aware of if they specify invalid overrides and not silently ignore (which is what was happening with an incorrectly set value in @BionIT 's configuration.
Issues Resolved
Fixes #6704
Changelog
Check List
yarn test:jest
yarn test:jest_integration