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

Updated atlaskit components #8423

Closed
wants to merge 25 commits into from

Conversation

skolmer
Copy link
Contributor

@skolmer skolmer commented Jan 14, 2021

This PR updates all atlaskit dependencies.
This will increase accessibility of jitsi-meet because the new atlaskit components contain required aria attributes and other accessibility improvements. They also improved performance and responsiveness of some components.

If you are confused about the webpack config changes. The atlaskit team missed to add dark theme support to modal dialogs so we are injecting the required props to this component.

If this PR gets accepted we would like to provide an additional PR to complete support of WCAG 2.1 guidelines by fixing accessibility issues that are not related to atlaskit.

To fully match WCAG 2.1 we also need to re-enable focus-lock that was disabled in this commit (3c1f056). This might be possible using a newer feature of the library: theKashey/react-focus-lock#104
Any thoughts about this?

@jitsi-jenkins
Copy link

Hi, thanks for your contribution!
If you haven't already done so, could you please make sure you sign our CLA (https://jitsi.org/icla for individuals and https://jitsi.org/ccla for corporations)? We would unfortunately be unable to merge your patch unless we have that piece :(.

@skolmer
Copy link
Contributor Author

skolmer commented Jan 14, 2021

Hi, thanks for your contribution!
If you haven't already done so, could you please make sure you sign our CLA (https://jitsi.org/icla for individuals and https://jitsi.org/ccla for corporations)? We would unfortunately be unable to merge your patch unless we have that piece :(.

CLA was already signed for this PR -> #7902

@Simon818
Copy link

Not sure if this is appropriate here, but just wanted to say thanks for doing this. I think there are a lot of people holding off on switching because of a lack of ARIA and other accessibility-related concerns, and that seems like a shame.

@saghul
Copy link
Member

saghul commented Jan 14, 2021

Impressive work! We have some AtlasKit overrides so making sure everything is still working as intended may take a bit, but I'm very excited to see this!

@skolmer
Copy link
Contributor Author

skolmer commented Jan 14, 2021

Impressive work! We have some AtlasKit overrides so making sure everything is still working as intended may take a bit, but I'm very excited to see this!

Thanks! Definitely a good idea to do some additional testing. I made sure though that everything is still working as expected (compared against meet.jit.si) but always easy to miss a detail when making such a change.
Just let us know when there is anything we can help with.
Our client is currently doing another round of WCAG 2.1 compatibility checks. If anything else related to atlaskit comes up there I will update the PR.

@saghul saghul requested a review from muscat1 January 15, 2021 08:47
@saghul
Copy link
Member

saghul commented Jan 15, 2021

I made a quick pass and it's almost there! Things I noticed:

"GSM bars" popover is not correctly positioned (then vs now)

Screenshot 2021-01-15 at 09 38 12

Screenshot 2021-01-15 at 09 38 20

Remote participant menu is not correctly positioned (then vs now).

Screenshot 2021-01-15 at 09 45 39

Screenshot 2021-01-15 at 09 44 50

I think both may have the same root cause. I think in general all overrides in _atlaskit_overrides.scss may need a revisit.

@saghul
Copy link
Member

saghul commented Jan 15, 2021

Tip: due to how large the changes in package-lock are you may want to skip that file until we are ready to merge.

@skolmer
Copy link
Contributor Author

skolmer commented Jan 15, 2021

Ok, looks like I missed some styles in _atlaskit_overrides.scss. I will fix that today and let you know when it's ready.

@saghul saghul added accessibility Issue related to accessibility topics/handicapped users ui/ux User Interface / User Experience related issues labels Jan 15, 2021
@saghul
Copy link
Member

saghul commented Jan 15, 2021

If this PR gets accepted we would like to provide an additional PR to complete support of WCAG 2.1 guidelines by fixing accessibility issues that are not related to atlaskit.

To fully match WCAG 2.1 we also need to re-enable focus-lock that was disabled in this commit (3c1f056). This might be possible using a newer feature of the library: theKashey/react-focus-lock#104
Any thoughts about this?

Sorry I forgot to reply to this. Let's discuss extra individual items in dedicated PRs once AtlasKit is updated, how does that sound?

@skolmer
Copy link
Contributor Author

skolmer commented Jan 15, 2021

@saghul There was a breaking change in InlineDialog that I missed. This is now fixed too.

I'm still working on _atlaskit_overrides.scss to check that every style in there gets applied. This will follow in another commit.

css/_atlaskit_overrides.scss Outdated Show resolved Hide resolved
@skolmer
Copy link
Contributor Author

skolmer commented Jan 15, 2021

_atlaskit_overrides.scss has now been cleaned up too. Some styles were obsolete because it was already fixed in atlaskit and others had been reworked to not rely on those generic class names that might change in the future. The PR is now ready for a final review @saghul

@skolmer
Copy link
Contributor Author

skolmer commented Jan 21, 2021

Ok, I somehow expected that the new npm version will cause trouble at some point. Looks like I have to downgrade to update the lockfile.

@saghul @muscat1 Did you find the time to retest, anything else that came up?

@saghul
Copy link
Member

saghul commented Jan 21, 2021

I haven't had the time to take a second look, sorry. What Node / npm version did you use? We use Node 12 and npm 6. @muscat1 can you please check again tomorrow?

@skolmer
Copy link
Contributor Author

skolmer commented Jan 21, 2021

I haven't had the time to take a second look, sorry. What Node / npm version did you use? We use Node 12 and npm 6. @muscat1 can you please check again tomorrow?

I installed node 15 a few days ago. That wasn't a good idea because they changed the lockfile version for the first time in years.

@muscat1
Copy link
Member

muscat1 commented Jan 25, 2021

Tested the use cases I've mentioned above and they have been addressed, thanks for looking into them! From my perspective, things seem to be in order, unless you can find some other irregularities, @saghul

There do seem to be some linting problems, though :D

@skolmer
Copy link
Contributor Author

skolmer commented Jan 25, 2021

Tested the use cases I've mentioned above and they have been addressed, thanks for looking into them! From my perspective, things seem to be in order, unless you can find some other irregularities, @saghul

There do seem to be some linting problems, though :D

Thanks @muscat1, I will look into the linting issues.

@skolmer skolmer requested review from saghul and muscat1 January 25, 2021 14:30
@saghul
Copy link
Member

saghul commented Jan 26, 2021

Jenkins please test this please.

@saghul
Copy link
Member

saghul commented Jan 26, 2021

Squashed, rebased and added package-lock in #8480

@saghul
Copy link
Member

saghul commented Jan 26, 2021

Jenkins please test this please.

@saghul
Copy link
Member

saghul commented Jan 26, 2021

@skolmer The test failures seem "legit", you can check the selenium output on the details link. It says the element is not interactable, but I couldn't figure out why on a quick test. Can you please take a look?

@skolmer
Copy link
Contributor Author

skolmer commented Jan 26, 2021

@saghul Can you point me to the code of the failing selenium test? Maybe it is just because of changed html structure.

@saghul
Copy link
Member

saghul commented Jan 26, 2021

@skolmer
Copy link
Contributor Author

skolmer commented Jan 26, 2021

@saghul This is a tricky one. In the old atlaskit checkbox the input field had opacity: 0 and was positioned behind the svg. In the new one it has appearance: none which makes it inaccessible to selenium. I think there are a few possible solutions:

  1. Change the checkbox selenium test to override the apperance style before using webelement.click()
  2. Change the checkbox selenium test to use javascript click instead of webelement.click()
  3. Override css styles of input[type="checkbox"] to us the old approach of previous atlaskit versions:
    left: 50%;
    margin: 0px;
    opacity: 0;
    padding: 0px;
    position: absolute;
    transform: translate(-50%, -50%);
    top: 50%;

This is the line that is failing: https://github.com/jitsi/jitsi-meet-torture/blob/master/src/test/java/org/jitsi/meet/test/pageobjects/web/SettingsDialog.java#L215

@saghul
Copy link
Member

saghul commented Jan 26, 2021

I'm thinking 2 sounds like a good approach here, since it would work with both current and after-your-PR changes, while staying away from more AtlasKit overrides. Thoughts @muscat1 ?

@skolmer
Copy link
Contributor Author

skolmer commented Jan 26, 2021

2 would be ((JavascriptExecutor)driver).executeScript("arguments[0].click();", checkbox); instead of checkbox.click(); https://github.com/jitsi/jitsi-meet-torture/blob/69e5b6e123b98842b58bdf156ba5044f3695cb6d/src/test/java/org/jitsi/meet/test/pageobjects/web/SettingsDialog.java#L215

@saghul
Copy link
Member

saghul commented Jan 26, 2021

Tested locally and works fine, mind making a PR to the torture project?

@damencho
Copy link
Member

If you update torture, will that work for the old versions?

@skolmer
Copy link
Contributor Author

skolmer commented Jan 26, 2021

If you update torture, will that work for the old versions?

I haven't run the tests against the old version of atlaskit but judging based on the HTML structure it would work.

@saghul
Copy link
Member

saghul commented Jan 26, 2021

If you update torture, will that work for the old versions?

Yeah

@damencho
Copy link
Member

Ok, thanks.

@saghul
Copy link
Member

saghul commented Jan 26, 2021

Landed in #8480. Amazing work @skolmer , thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility Issue related to accessibility topics/handicapped users ui/ux User Interface / User Experience related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants