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 language switcher errors #12448

Conversation

AlexVelezLl
Copy link
Member

@AlexVelezLl AlexVelezLl commented Jul 16, 2024

(Note) This PR depends on learningequality/kolibri-design-system#680 to be merged and released.

Summary

Updates KDS to fix KListWithOverflow overflow items calculation, and fix KLanguageSwitcherModal positioning. I also checked the Setup wizard, and no regressions were observed.

Before:
image

After:
image

References

Fixes #12447.

Reviewer guidance

Follow #12447.

Testing checklist

  • Contributor has fully tested the PR manually
  • If there are any front-end changes, before/after screenshots are included
  • Critical user journeys are covered by Gherkin stories
  • Critical and brittle code paths are covered by unit tests

PR process

  • PR has the correct target branch and milestone
  • PR has 'needs review' or 'work-in-progress' label
  • If PR is ready for review, a reviewer has been added. (Don't use 'Assignees')
  • If this is an important user-facing change, PR or related issue has a 'changelog' label
  • If this includes an internal dependency change, a link to the diff is provided

Reviewer checklist

  • Automated test coverage is satisfactory
  • PR is fully functional
  • PR has been tested for accessibility regressions
  • External dependency files were updated if necessary (yarn and pip)
  • Documentation is updated
  • Contributor is in AUTHORS.md

@MisRob
Copy link
Member

MisRob commented Jul 18, 2024

Thank you @AlexVelezLl, I can confirm the fixes work well and I didn't observe any regressions.

@MisRob
Copy link
Member

MisRob commented Jul 18, 2024

Ah one more thing, after new KDS version is installed here, would you also removed <Teleport> from here

<Teleport
v-if="windowIsLarge"
to="body"
>
<KModal
or do you prefer follow-up issue?

@rtibbles
Copy link
Member

Would be a matter of adding :appendToBody="windowIsLarge" I think, then removing Teleport, and the teleport dependency in the learn plugin. Should be straight forward, but fine for a follow up if preferred.

@MisRob
Copy link
Member

MisRob commented Jul 18, 2024

@rtibbles

So this syntax says

<Teleport 
   v-if="windowIsLarge" 
   to="body" 
 > 

to use Teleport only if windowIsLarge? Sounds like silly question :) My read of this was that the modal is rather not supposed to get rendered at all for windowIsLarge.

@MisRob
Copy link
Member

MisRob commented Jul 18, 2024

Would be a matter of adding :appendToBody="windowIsLarge" I think

Asking because I left a note for @AlexVelezLl just for consideration of having appendTo prop so we can choose the element to append to (you can see the KDS issue for reasons for that). However, if we'd need to support conditional teleport application, in such case KDS would need to support something like appendTo=windowIsLarge ? 'body' : null where null would indicate we don't want to append it, if that was the direction to take (or some alternative interface that would allow for condition)

@rtibbles
Copy link
Member

Oh... yes, sorry - so we should just move the v-if to the KModal instead, you're right and it would just be appendToBody as it is here...

@MisRob
Copy link
Member

MisRob commented Jul 18, 2024

No problem :) That simplifies the situation around potential appendTo.

@MisRob
Copy link
Member

MisRob commented Jul 18, 2024

I thought that perhaps Teleport does some nice magic around v-ifs after reading your comment :)

Copy link
Member

@MisRob MisRob left a comment

Choose a reason for hiding this comment

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

As soon as we install the new release here, we can merge. Thanks @AlexVelezLl.

@MisRob MisRob changed the title Fix language switcher errors [do not merge until KDS releases] Fix language switcher errors Jul 19, 2024
@MisRob MisRob changed the title [do not merge until KDS releases] Fix language switcher errors [do not merge until KDS released] Fix language switcher errors Jul 19, 2024
@github-actions github-actions bot added the APP: Learn Re: Learn App (content, quizzes, lessons, etc.) label Jul 22, 2024
@AlexVelezLl AlexVelezLl changed the title [do not merge until KDS released] Fix language switcher errors Fix language switcher errors Jul 26, 2024
@rtibbles rtibbles merged commit 9243d5d into learningequality:release-v0.17.x Jul 27, 2024
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
APP: Learn Re: Learn App (content, quizzes, lessons, etc.) DEV: frontend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants