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

[Look&Feel] Refactor to use semantic headers for page, modal & flyout #7192

Merged

Conversation

zhongnansu
Copy link
Member

@zhongnansu zhongnansu commented Jul 8, 2024

Description

Refactor to use semantic headers for page, modal & flyout

image

Issues Resolved

Screenshot

Testing the changes

Changelog

  • refactor: [Look&Feel] Refactor to use semantic headers for page, modal & flyout

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

Copy link
Contributor

github-actions bot commented Jul 8, 2024

❌ Empty Changelog Section

The Changelog section in your PR description is empty. Please add a valid changelog entry or entries. If you did add a changelog entry, check to make sure that it was not accidentally included inside the comment block in the Changelog section.

Copy link

codecov bot commented Jul 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.55%. Comparing base (87627af) to head (829e83c).
Report is 339 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7192   +/-   ##
=======================================
  Coverage   67.55%   67.55%           
=======================================
  Files        3469     3469           
  Lines       68479    68479           
  Branches    11130    11130           
=======================================
  Hits        46264    46264           
  Misses      19512    19512           
  Partials     2703     2703           
Flag Coverage Δ
Linux_1 33.13% <ø> (ø)
Linux_2 55.26% <ø> (ø)
Linux_3 45.30% <ø> (ø)
Linux_4 34.71% <ø> (ø)
Windows_1 33.15% <ø> (ø)
Windows_2 55.21% <ø> (ø)
Windows_3 45.32% <ø> (ø)
Windows_4 34.71% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Copy link
Contributor

github-actions bot commented Jul 8, 2024

❌ Empty Changelog Section

The Changelog section in your PR description is empty. Please add a valid changelog entry or entries. If you did add a changelog entry, check to make sure that it was not accidentally included inside the comment block in the Changelog section.

@zhongnansu zhongnansu marked this pull request as ready for review July 8, 2024 21:56
opensearch-changeset-bot bot added a commit to zhongnansu/OpenSearch-Dashboards that referenced this pull request Jul 8, 2024
@zhongnansu zhongnansu changed the title [Look&Feel] Update semantic header to use correct size [Look&Feel] Update to use semantic headers Jul 8, 2024
opensearch-changeset-bot bot added a commit to zhongnansu/OpenSearch-Dashboards that referenced this pull request Jul 8, 2024
Copy link
Collaborator

@virajsanghvi virajsanghvi left a comment

Choose a reason for hiding this comment

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

Clarifications on guidance after going through these:

  • Let's only make changes to page content headers or modal/flyout headers - other h1/h2 tags, let's ignore as they may not be being used correctly or are there for accessibility purposes.
  • Let's swap out EuiTitle for EuiText size='s' (or wrap when not present)
  • If its using a small or xs EuiTitle, let's probably not change as they're intentionally small.

Also, I think you will want to search for all modals/flyouts to adjust their headers. I don't think they all use header tags today so may not be coming up in your search.

src/plugins/inspector/public/ui/inspector_panel.tsx Outdated Show resolved Hide resolved
src/plugins/vis_type_markdown/public/markdown_options.tsx Outdated Show resolved Hide resolved
@@ -42,7 +42,7 @@ interface VisHelpTextProps {
export const VisHelpText = ({ name, title, description, highlightMsg }: VisHelpTextProps) => {
return (
<React.Fragment>
<EuiTitle size="s">
<EuiTitle size="m">
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this in a visualization? If so, let's not change - given its intentionally small, not sure if we should change either way. If you can point of screenshot, would help me give feedback

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 a header in the select vis type modal, but it's not the major header. I agree we can leave it as small.
image

<h1 id="visualizeListingHeading">
<FormattedMessage
id="visualize.listing.createNew.title"
defaultMessage="Create your first visualization"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's leave this as is because its in the visualization

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 the page content header for create visualization. Given the requirement, I think we should wrap it with EuiText
image

@zhongnansu zhongnansu changed the title [Look&Feel] Update to use semantic headers [Look&Feel] Refactor to use semantic headers for page, modal & flyout Jul 9, 2024
opensearch-changeset-bot bot added a commit to zhongnansu/OpenSearch-Dashboards that referenced this pull request Jul 9, 2024
@zhongnansu
Copy link
Member Author

Clarifications on guidance after going through these:

  • Let's only make changes to page content headers or modal/flyout headers - other h1/h2 tags, let's ignore as they may not be being used correctly or are there for accessibility purposes.
  • Let's swap out EuiTitle for EuiText size='s' (or wrap when not present)
  • If its using a small or xs EuiTitle, let's probably not change as they're intentionally small.

Also, I think you will want to search for all modals/flyouts to adjust their headers. I don't think they all use header tags today so may not be coming up in your search.

Updated the PR to use EuiText accordingly and refactored missing modals/flyouts to use semantic headers.

@virajsanghvi
Copy link
Collaborator

Given this isn't a flyout but a pane, let's not make this change:
image

Signed-off-by: Zhongnan Su <szhongna@amazon.com>
@zhongnansu
Copy link
Member Author

Given this isn't a flyout but a pane, let's not make this change: image

@virajsanghvi This is actually being reverted and will remain "xs". I will correct the screenshot

@virajsanghvi virajsanghvi added the look & feel Look and Feel Improvements label Jul 10, 2024
@zhongnansu zhongnansu added ux / ui Improvements or additions to user experience, flows, components, UI elements backport 2.x v2.16.0 labels Jul 10, 2024
@zhongnansu zhongnansu merged commit 96fb9d6 into opensearch-project:main Jul 10, 2024
75 checks passed
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

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-7192-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 96fb9d629e6539db4dacd922df3fff6809fdb407
# Push it to GitHub
git push --set-upstream origin backport/backport-7192-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 base branch is 2.x and the compare/head branch is backport/backport-7192-to-2.x.

opensearch-trigger-bot bot pushed a commit that referenced this pull request Jul 11, 2024
…#7192)

* [Look&Feel] refactor to use semantic header for page, modal and flygout

Signed-off-by: Zhongnan Su <szhongna@amazon.com>

* Changeset file for PR #7192 created/updated

---------

Signed-off-by: Zhongnan Su <szhongna@amazon.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
(cherry picked from commit 96fb9d6)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
zhongnansu pushed a commit that referenced this pull request Jul 11, 2024
…#7192) (#7223)

* [Look&Feel] refactor to use semantic header for page, modal and flygout



* Changeset file for PR #7192 created/updated

---------



(cherry picked from commit 96fb9d6)

Signed-off-by: Zhongnan Su <szhongna@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: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x distinguished-contributor in-next look & feel Look and Feel Improvements ux / ui Improvements or additions to user experience, flows, components, UI elements v2.16.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants