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

[Fix] Duplicate Icon Rendering in Markdown Visualization Editor #5511

Merged
merged 1 commit into from
Dec 13, 2023

Conversation

willie-hung
Copy link
Contributor

@willie-hung willie-hung commented Nov 20, 2023

Description

The revision makes the icon appear only once, aligning with the design of the user interface.

Issues Resolved

Resolves #5510

Screenshot

Before

Screenshot 2023-11-19 at 6 03 15 PM

After

Screenshot 2023-11-19 at 6 17 30 PM

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

Signed-off-by: Willie Hung <willie880201044@gmail.com>
@willie-hung
Copy link
Contributor Author

When this line is specified, the EuiLink component will render the popout icon, no need to render another EuiIcon in this case.

Copy link

codecov bot commented Nov 20, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (f6ce6e7) 66.98% compared to head (b21877b) 66.98%.
Report is 8 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5511   +/-   ##
=======================================
  Coverage   66.98%   66.98%           
=======================================
  Files        3293     3293           
  Lines       63281    63281           
  Branches    10061    10061           
=======================================
  Hits        42389    42389           
  Misses      18451    18451           
  Partials     2441     2441           
Flag Coverage Δ
Linux_1 35.24% <ø> (ø)
Linux_2 55.21% <ø> (ø)
Linux_3 43.79% <ø> (+0.01%) ⬆️
Linux_4 35.33% <ø> (ø)
Windows_1 35.27% <ø> (ø)
Windows_2 55.18% <ø> (ø)
Windows_3 43.80% <ø> (ø)
Windows_4 35.33% <ø> (ø)

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.

@joshuarrrr joshuarrrr added Skip-Changelog PRs that are too trivial to warrant a changelog or release notes entry backport 2.x labels Nov 29, 2023
@joshuarrrr
Copy link
Member

When this line is specified, the EuiLink component will render the popout icon, no need to render another EuiIcon in this case.

@Willie-The-Lord Do you think we need to improve anything in the OUI docs site to prevent this sort of error elsewhere? https://oui.opensearch.org/1.3/#/navigation/link

From a quick scan, I can see that target="_blank" sets external to true, but I don't see any external links in the example or any explanation that the icon is included automatically.

@joshuarrrr
Copy link
Member

Maintainers should also verify if this bug exists in 1.3.x.

@willie-hung
Copy link
Contributor Author

willie-hung commented Dec 12, 2023

From a quick scan, I can see that target="_blank" sets external to true, but I don't see any external links in the example or any explanation that the icon is included automatically.

@joshuarrrr Yeah, that's right! Here's the implementation of the OuiLink prop for your reference:

  1. OuiIcon - popout
    https://github.com/Willie-The-Lord/oui/blob/24592a68111ab47d511fc250ed18ef03ccac6f25/src/components/link/link.tsx#L132-L139

  2. the logic that render the popout icon
    https://github.com/Willie-The-Lord/oui/blob/24592a68111ab47d511fc250ed18ef03ccac6f25/src/components/link/link.tsx#L183-L184

I think we should raise a PR to add an explanation on the oui doc website for the OuiLink. What do you think? Thanks!

@willie-hung
Copy link
Contributor Author

@joshuarrrr I've just raised a draft PR to make the ouiLink documentation more explicit. Please help verify whether it's the best place to put the explanation. Thanks!

@ananzh ananzh added bug Something isn't working and removed backport 2.x labels Dec 12, 2023
@ananzh
Copy link
Member

ananzh commented Dec 13, 2023

1.3 is still using eui and has no issue

Screenshot 2023-12-12 at 8 38 31 PM

@ananzh ananzh merged commit b8d30dc into opensearch-project:main Dec 13, 2023
83 of 101 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Dec 13, 2023
Signed-off-by: Willie Hung <willie880201044@gmail.com>
(cherry picked from commit b8d30dc)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@willie-hung willie-hung deleted the bug/duplicate-icons branch December 13, 2023 18:13
abbyhu2000 pushed a commit that referenced this pull request Dec 13, 2023
(cherry picked from commit b8d30dc)

Signed-off-by: Willie Hung <willie880201044@gmail.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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x bug Something isn't working repeat-contributor Skip-Changelog PRs that are too trivial to warrant a changelog or release notes entry v2.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Duplicate Icon Rendering in Markdown Visualization Editor
3 participants