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

Modify the button of selectable component to fix the title overflow issue #6465

Merged
merged 2 commits into from
Apr 16, 2024

Conversation

zhyuanqi
Copy link
Collaborator

@zhyuanqi zhyuanqi commented Apr 15, 2024

Description

Modify the button of selectable component to fix the title overflow issue

Screenshot

Screenshot 2024-04-15 at 4 43 39 PM

Testing the changes

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

codecov bot commented Apr 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.58%. Comparing base (e785fd3) to head (75445e7).
Report is 13 commits behind head on main.

❗ Current head 75445e7 differs from pull request most recent head 79c435b. Consider uploading reports for the commit 79c435b to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6465      +/-   ##
==========================================
+ Coverage   49.55%   55.58%   +6.02%     
==========================================
  Files        2670     1200    -1470     
  Lines       54290    24271   -30019     
  Branches     8878     4094    -4784     
==========================================
- Hits        26906    13490   -13416     
+ Misses      25720    10137   -15583     
+ Partials     1664      644    -1020     
Flag Coverage Δ
Windows_1 ?
Windows_2 55.58% <ø> (?)
Windows_3 ?

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.

@@ -237,6 +238,7 @@ export class DataSourceSelectable extends React.Component<
iconSide="left"
size="s"
disabled={this.props.disabled || false}
textProps={{ className: 'buttonTitle' }}
Copy link
Collaborator

Choose a reason for hiding this comment

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

what's the difference of text props vs className? Can we be more specific about the class name?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

So the test props is "Object of props passed to the wrapping the content's text/children only (not icon)" based on the oui document. Not much difference from className. Let me move to className.

@zhyuanqi zhyuanqi force-pushed the selectable-button branch from 20ccf6c to e64c92c Compare April 16, 2024 01:35
BionIT
BionIT previously approved these changes Apr 16, 2024
BionIT
BionIT previously approved these changes Apr 16, 2024
@BionIT BionIT changed the title Modify the button of selectable component to fix the title overflow i… Modify the button of selectable component to fix the title overflow issue Apr 16, 2024
zhongnansu
zhongnansu previously approved these changes Apr 16, 2024
@zhyuanqi zhyuanqi force-pushed the selectable-button branch from f573756 to 79c435b Compare April 16, 2024 20:49
@zhongnansu zhongnansu merged commit b619ccb into opensearch-project:main Apr 16, 2024
65 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Apr 16, 2024
…ssue (#6465)

* Modify the button of selectable component to fix the title overflow issue

Signed-off-by: Yuanqi(Ella) Zhu <[email protected]>

* update snapshot

Signed-off-by: Yuanqi(Ella) Zhu <[email protected]>

---------

Signed-off-by: Yuanqi(Ella) Zhu <[email protected]>
(cherry picked from commit b619ccb)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md
zhongnansu pushed a commit that referenced this pull request Apr 17, 2024
…ssue (#6465)

* Modify the button of selectable component to fix the title overflow issue

Signed-off-by: Yuanqi(Ella) Zhu <[email protected]>

* update snapshot

Signed-off-by: Yuanqi(Ella) Zhu <[email protected]>

---------

Signed-off-by: Yuanqi(Ella) Zhu <[email protected]>
(cherry picked from commit b619ccb)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

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

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-6465-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 b619ccb5fea8b23a748d74ba3dec21aabb1a7765
# Push it to GitHub
git push --set-upstream origin backport/backport-6465-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-6465-to-2.x.

zhyuanqi added a commit to zhyuanqi/OpenSearch-Dashboards that referenced this pull request Apr 18, 2024
…ssue (opensearch-project#6465)

* Modify the button of selectable component to fix the title overflow issue

Signed-off-by: Yuanqi(Ella) Zhu <[email protected]>

* update snapshot

Signed-off-by: Yuanqi(Ella) Zhu <[email protected]>

---------

Signed-off-by: Yuanqi(Ella) Zhu <[email protected]>
(cherry picked from commit b619ccb)
zhyuanqi added a commit to zhyuanqi/OpenSearch-Dashboards that referenced this pull request Apr 18, 2024
…ssue (opensearch-project#6465)

* Modify the button of selectable component to fix the title overflow issue

Signed-off-by: Yuanqi(Ella) Zhu <[email protected]>

* update snapshot

Signed-off-by: Yuanqi(Ella) Zhu <[email protected]>

---------

Signed-off-by: Yuanqi(Ella) Zhu <[email protected]>
(cherry picked from commit b619ccb)
zhyuanqi added a commit to zhyuanqi/OpenSearch-Dashboards that referenced this pull request Apr 18, 2024
…ssue (opensearch-project#6465)

* Modify the button of selectable component to fix the title overflow issue

Signed-off-by: Yuanqi(Ella) Zhu <[email protected]>

* update snapshot

Signed-off-by: Yuanqi(Ella) Zhu <[email protected]>

---------

Signed-off-by: Yuanqi(Ella) Zhu <[email protected]>
(cherry picked from commit b619ccb)
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

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

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-6465-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 b619ccb5fea8b23a748d74ba3dec21aabb1a7765
# Push it to GitHub
git push --set-upstream origin backport/backport-6465-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-6465-to-2.x.

BionIT added a commit that referenced this pull request Apr 18, 2024
…ssue (#6465) (#6495)

* Modify the button of selectable component to fix the title overflow issue

Signed-off-by: Yuanqi(Ella) Zhu <[email protected]>

* update snapshot

Signed-off-by: Yuanqi(Ella) Zhu <[email protected]>

---------

Signed-off-by: Yuanqi(Ella) Zhu <[email protected]>
(cherry picked from commit b619ccb)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Lu Yu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants