Refactor: update page header for settings, objects and index pattern page#7744
Refactor: update page header for settings, objects and index pattern page#7744ruanyl merged 7 commits intoopensearch-project:mainfrom
Conversation
Signed-off-by: tygao <tygao@amazon.com>
Signed-off-by: tygao <tygao@amazon.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7744 +/- ##
=======================================
Coverage 63.82% 63.83%
=======================================
Files 3650 3652 +2
Lines 80966 81012 +46
Branches 12894 12904 +10
=======================================
+ Hits 51673 51710 +37
- Misses 26126 26131 +5
- Partials 3167 3171 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Signed-off-by: tygao <tygao@amazon.com>
| {showTagsSection && renderBadges()} | ||
| {renderDescription()} | ||
| {conflictedFields.length > 0 && ( | ||
| <> | ||
| <EuiSpacer /> | ||
| <EuiCallOut title={mappingConflictHeader} color="warning" iconType="alert"> | ||
| <p>{mappingConflictLabel}</p> | ||
| </EuiCallOut> | ||
| </> | ||
| )} | ||
| <Tabs | ||
| indexPattern={indexPattern} | ||
| saveIndexPattern={data.indexPatterns.updateSavedObject.bind(data.indexPatterns)} | ||
| fields={fields} | ||
| history={history} | ||
| location={location} | ||
| /> |
There was a problem hiding this comment.
| {showTagsSection && renderBadges()} | |
| {renderDescription()} | |
| {conflictedFields.length > 0 && ( | |
| <> | |
| <EuiSpacer /> | |
| <EuiCallOut title={mappingConflictHeader} color="warning" iconType="alert"> | |
| <p>{mappingConflictLabel}</p> | |
| </EuiCallOut> | |
| </> | |
| )} | |
| <Tabs | |
| indexPattern={indexPattern} | |
| saveIndexPattern={data.indexPatterns.updateSavedObject.bind(data.indexPatterns)} | |
| fields={fields} | |
| history={history} | |
| location={location} | |
| /> | |
| const content = ( | |
| <> | |
| {showTagsSection && renderBadges()} | |
| {renderDescription()} | |
| {conflictedFields.length > 0 && ( | |
| <> | |
| <EuiSpacer /> | |
| <EuiCallOut title={mappingConflictHeader} color="warning" iconType="alert"> | |
| <p>{mappingConflictLabel}</p> | |
| </EuiCallOut> | |
| </> | |
| )} | |
| <Tabs | |
| indexPattern={indexPattern} | |
| saveIndexPattern={data.indexPatterns.updateSavedObject.bind(data.indexPatterns)} | |
| fields={fields} | |
| history={history} | |
| location={location} | |
| /> | |
| </> | |
| ) |
Nit: What about we change it like this? the content part should be the same no matter the toggle is on or off.
There was a problem hiding this comment.
Yes, i tried to extract but fount it may be hard to maintain because there are three different spacers between two contents.
There was a problem hiding this comment.
Perhaps you can move the spacer into the renderDescription and renderBadges method. Then in that case the content will be exactly the same.
There was a problem hiding this comment.
Yes, but the spacer between Tabs and EuiCallOut maybe hard to contain.
src/plugins/index_pattern_management/public/components/edit_index_pattern/tabs/tabs.tsx
Outdated
Show resolved
Hide resolved
|
LGTM, thanks for the amazing changes. Now it looks consistent across multiple pages and steps. |
Signed-off-by: tygao <tygao@amazon.com>
Signed-off-by: tygao <tygao@amazon.com>
|
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-7744-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 e490b6b3e458a19daa849d529f80d8a2f588f4eb
# Push it to GitHub
git push --set-upstream origin backport/backport-7744-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch-Dashboards/backport-2.xThen, create a pull request where the |
…page (opensearch-project#7744) * settings header Signed-off-by: tygao <tygao@amazon.com> * update all pages header Signed-off-by: tygao <tygao@amazon.com> * Changeset file for PR opensearch-project#7744 created/updated * style: update management style Signed-off-by: tygao <tygao@amazon.com> * remove extra spacer Signed-off-by: tygao <tygao@amazon.com> * add tests and snapshots Signed-off-by: tygao <tygao@amazon.com> --------- Signed-off-by: tygao <tygao@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
|
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-7744-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 e490b6b3e458a19daa849d529f80d8a2f588f4eb
# Push it to GitHub
git push --set-upstream origin backport/backport-7744-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch-Dashboards/backport-2.xThen, create a pull request where the |
…page opensearch-project#7744 Signed-off-by: tygao <tygao@amazon.com>
…dit in Assets page (#7749) * settings header Signed-off-by: tygao <tygao@amazon.com> * update all pages header Signed-off-by: tygao <tygao@amazon.com> * Changeset file for PR #7744 created/updated * style: update management style Signed-off-by: tygao <tygao@amazon.com> * remove extra spacer Signed-off-by: tygao <tygao@amazon.com> * add tests and snapshots Signed-off-by: tygao <tygao@amazon.com> * feat: jump to standard application when the toggle is on Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * Changeset file for PR #7749 created/updated * feat: improve test coverage Signed-off-by: SuZhou-Joe <suzhou@amazon.com> --------- Signed-off-by: tygao <tygao@amazon.com> Signed-off-by: SuZhou-Joe <suzhou@amazon.com> Co-authored-by: tygao <tygao@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
…dit in Assets page (#7749) * settings header Signed-off-by: tygao <tygao@amazon.com> * update all pages header Signed-off-by: tygao <tygao@amazon.com> * Changeset file for PR #7744 created/updated * style: update management style Signed-off-by: tygao <tygao@amazon.com> * remove extra spacer Signed-off-by: tygao <tygao@amazon.com> * add tests and snapshots Signed-off-by: tygao <tygao@amazon.com> * feat: jump to standard application when the toggle is on Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * Changeset file for PR #7749 created/updated * feat: improve test coverage Signed-off-by: SuZhou-Joe <suzhou@amazon.com> --------- Signed-off-by: tygao <tygao@amazon.com> Signed-off-by: SuZhou-Joe <suzhou@amazon.com> Co-authored-by: tygao <tygao@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> (cherry picked from commit 9dd9b14) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…dit in Assets page (#7749) (#7825) * settings header * update all pages header * Changeset file for PR #7744 created/updated * style: update management style * remove extra spacer * add tests and snapshots * feat: jump to standard application when the toggle is on * Changeset file for PR #7749 created/updated * feat: improve test coverage --------- (cherry picked from commit 9dd9b14) Signed-off-by: tygao <tygao@amazon.com> Signed-off-by: SuZhou-Joe <suzhou@amazon.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: tygao <tygao@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Description
update page header for settings, objects and index pattern page
Screenshot
Settings


before
after
Assets


before
after
Index patterns










before
after
before
after
before
after
before
after
before
after
Testing the changes
Go to settings page, enable/disable useNewHomePage and visit settings, objects and index pattern page to test header.
Changelog
Check List
yarn test:jestyarn test:jest_integration