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

UHF-10907 external icon #1141

Merged
merged 3 commits into from
Dec 19, 2024
Merged

UHF-10907 external icon #1141

merged 3 commits into from
Dec 19, 2024

Conversation

Arkkimaagi
Copy link
Contributor

@Arkkimaagi Arkkimaagi commented Dec 19, 2024

UHF-10907

  • Our external link icons are arrows, not arrow out of box, this can confuse some users accessibilitywise
  • Arabic buttons have broken hover state
  • Ckeditor does not have link animations but has button animations

What was done

  • All of the above were fixed

How to install

  • Make sure your Etusivu instance is up and running on latest dev branch.
    • git pull origin dev
    • make fresh
  • Update the HDBT theme
    • composer require drupal/hdbt:dev-UHF-10907_external_icon
  • Run make drush-cr

How to test

Create a page with text-paragraph and this content both in a main language and arabic:

<figure class="table" tabindex="0">
  <table>
    <tbody>
      <tr>
        <td>Linkki</td>
        <td>Taustavärillinen</td>
        <td>Kehystetty</td>
        <td>Korostettu</td>
      </tr>
      <tr>
        <td><a href="/">Linkki</a></td>
        <td><a href="/" data-hds-component="button">Linkki</a></td>
        <td><a href="/" data-hds-variant="secondary" data-hds-component="button">Linkki</a></td>
        <td><a href="/" data-hds-variant="supplementary" data-hds-component="button">Linkki</a></td>
      </tr>
      <tr>
        <td><a data-is-external="true" href="https://suomi.fi">External</a></td>
        <td><a data-is-external="true" href="https://suomi.fi" data-hds-component="button">External</a></td>
        <td><a data-is-external="true" href="https://suomi.fi" data-hds-variant="secondary" data-hds-component="button">External</a></td>
        <td><a data-is-external="true" href="https://suomi.fi" data-hds-variant="supplementary" data-hds-component="button">External</a></td>
      </tr>
      <tr>
        <td><a data-protocol="mailto" href="mailto:[email protected]">Email</a></td>
        <td><a data-protocol="mailto" href="mailto:[email protected]" data-hds-component="button">Email</a></td>
        <td><a data-protocol="mailto" href="mailto:[email protected]" data-hds-variant="secondary" data-hds-component="button">Email</a></td>
        <td><a data-protocol="mailto" href="mailto:[email protected]" data-hds-variant="supplementary" data-hds-component="button">Email</a></td>
      </tr>
      <tr>
        <td><a data-protocol="tel" href="tel:050123456">Tel</a></td>
        <td><a data-protocol="tel" href="tel:050123456" data-hds-component="button">Tel</a></td>
        <td><a data-protocol="tel" href="tel:050123456" data-hds-variant="secondary" data-hds-component="button">Tel</a></td>
        <td><a data-protocol="tel" href="tel:050123456" data-hds-variant="supplementary" data-hds-component="button">Tel</a></td>
      </tr>
      <tr>
        <td>-</td>
        <td><a href="/" data-hds-icon-start="alert-circle" data-hds-component="button">Linkki</a></td>
        <td><a href="/" data-hds-icon-start="alert-circle" data-hds-variant="secondary" data-hds-component="button">Linkki</a></td>
        <td><a href="/" data-hds-icon-start="alert-circle" data-hds-variant="supplementary" data-hds-component="button">Linkki</a></td>
      </tr>
      <tr>
        <td>-</td>
        <td><a data-is-external="true" href="https://suomi.fi" data-hds-icon-start="alert-circle" data-hds-component="button">External</a></td>
        <td><a data-is-external="true" href="https://suomi.fi" data-hds-icon-start="alert-circle" data-hds-variant="secondary" data-hds-component="button">External</a></td>
        <td><a data-is-external="true" href="https://suomi.fi" data-hds-icon-start="alert-circle" data-hds-variant="supplementary" data-hds-component="button">External</a></td>
      </tr>
      <tr>
        <td>-</td>
        <td><a data-protocol="mailto" href="mailto:[email protected]" data-hds-icon-start="alert-circle" data-hds-component="button">Email</a></td>
        <td><a data-protocol="mailto" href="mailto:[email protected]" data-hds-icon-start="alert-circle" data-hds-variant="secondary" data-hds-component="button">Email</a></td>
        <td><a data-protocol="mailto" href="mailto:[email protected]" data-hds-icon-start="alert-circle" data-hds-variant="supplementary" data-hds-component="button">Email</a></td>
      </tr>
      <tr>
        <td>-</td>
        <td><a data-protocol="tel" href="tel:050123456" data-hds-icon-start="alert-circle" data-hds-component="button">Tel</a></td>
        <td><a data-protocol="tel" href="tel:050123456" data-hds-icon-start="alert-circle" data-hds-variant="secondary" data-hds-component="button">Tel</a></td>
        <td><a data-protocol="tel" href="tel:050123456" data-hds-icon-start="alert-circle" data-hds-variant="supplementary" data-hds-component="button">Tel</a></td>
      </tr>
    </tbody>
  </table>
</figure>
  • Check that external link and button icons work.
    • Check all the external links you can find on site, I may have missed some.
    • Check that ckeditor icon animations work for buttons and links
    • Check also arabic language, icons are on wrong side in arabic, but otherwise animate and look better than previously
  • Check that code follows our standards

Continuous documentation

  • This feature has been documented/the documentation has been updated
  • This change doesn't require updates to the documentation

Copy link

⚠️ Visual regression found! Please check if this change is wanted or accidental. You can check the output here: https://city-of-helsinki.github.io/drupal-hdbt-visual-regression/pull/1141/html_report/

@juho-lehmonen juho-lehmonen self-requested a review December 19, 2024 06:53
Copy link
Contributor

@juho-lehmonen juho-lehmonen left a comment

Choose a reason for hiding this comment

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

Looks good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants