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

feat(rtl-arrow): Fix arrows used for CTA's when in RTL #11736

Merged
merged 12 commits into from
May 4, 2024

Conversation

m4olivei
Copy link
Contributor

@m4olivei m4olivei commented Apr 22, 2024

Related Ticket(s)

Closes #11725
Jira Ticket

Description

Checkes document.dir and uses the appropriate arrow icon for the text direction (right in LTR and left in RTL). For many stories involving CTA's or CTA derivatives, avoid using the slotted icon when all we're going for is cta-type="local", in other words the arrow icon.

Testing instructions

  1. Navigate to any Story making use of a CTA and/or button
  2. Compare LTR and RTL
  3. In LTR, where the arrow icon is used, the arrow should be pointing right
  4. In RTL, where the arrow icon is used, the arrow should be pointing left

Changelog

Changed

  • Change the direction of the CTA arrow when in RTL languages.

@m4olivei m4olivei added bug Something isn't working dev Needs some dev work RTL Assigned to Arabic Right to Left work owner: Innovation Team used when the engineering work will be done by Hybrid Cloud with DDS engineers as consultants test: CDN preview used for generating @carbon/ibmdotcom-web-components CDN for testing labels Apr 22, 2024
@m4olivei m4olivei requested a review from a team as a code owner April 22, 2024 19:33
@m4olivei m4olivei requested review from emyarod, ariellalgilmore, bruno-amorim, jkaeser, marcelojcs and andy-blum and removed request for a team April 22, 2024 19:33
@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Apr 22, 2024

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Apr 22, 2024

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Apr 22, 2024

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Apr 22, 2024

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Apr 22, 2024

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Apr 22, 2024

Copy link
Member

@jkaeser jkaeser left a comment

Choose a reason for hiding this comment

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

Everything about this look good from a code perspective. Nice work as usual, @m4olivei!

I did find some Stories where arrows still aren't pointing the correct way in RTL. I imagine these are probably content issues in the Stories rather than code issues, but calling them out for a double check:

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Apr 25, 2024

@m4olivei m4olivei requested a review from jkaeser April 26, 2024 14:43
@m4olivei
Copy link
Contributor Author

Everything about this look good from a code perspective. Nice work as usual, @m4olivei!

I did find some Stories where arrows still aren't pointing the correct way in RTL. I imagine these are probably content issues in the Stories rather than code issues, but calling them out for a double check:

Thanks @jkaeser ! I've cleaned up those additional stories that you pointed out. Ready for another look.

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented May 3, 2024

Deploy preview created for package IBM.com Web Components Deploy Preview CDN:
https://ibmdotcom-cdn.s3.us-east.cloud-object-storage.appdomain.cloud/deploy-previews/11736/index.html

Built with commit: 83b35f4c0b5fe89eb17262d9263f67255e07d1ab

@kennylam kennylam added the Ready to merge Label for the pull requests that are ready to merge label May 4, 2024
@kodiakhq kodiakhq bot merged commit 23f196f into carbon-design-system:main May 4, 2024
15 of 22 checks passed
Copy link
Contributor

Hey there! This issue/pull request was referenced in recently released v2.9.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dev Needs some dev work owner: Innovation Team used when the engineering work will be done by Hybrid Cloud with DDS engineers as consultants Ready to merge Label for the pull requests that are ready to merge RTL Assigned to Arabic Right to Left work test: CDN preview used for generating @carbon/ibmdotcom-web-components CDN for testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[web components]: CTA buttons display arrow pointing in the wrong direction in RTL languages
4 participants