Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.
This repository was archived by the owner on Mar 4, 2020. It is now read-only.

RTL works incorrectly when rtl theme prop is changed dynamically (with no remount of Provider) #581

@kuzhelov

Description

@kuzhelov

Bug Report

Stardust component will be improperly displayed in RTL mode if rtl flag is changed dynamically for parent Provider component - i.e. when there is no remount of Provider component's instance happened.

Specifically, the root cause of this issue is absence of remount for Fela's Provider component.

Steps

  • create simple example and render Stardust Button component
import { Provider, Button } from '@stardust-ui/react'

// use any theme which has `rtl` being set to false by default
<Provider theme={teams}>
   <Button />
</Provider>
  • open React Dev Tools, and for Stardust Provider component check rtl box to true

Expected Result

  • rtl-* classes should be generated in <head> -> <style> DOM element
  • rtl-* should be applied to component's DOM node

Actual Result

  • 👍 rtl-* ARE applied to component's DOM node`
  • 👎 but there are no corresponding rtl-* classes generated for <head> -> <style> DOM element of the page - thus, styles of these classes are not applied to component

Version

0.14.0

Metadata

Metadata

Assignees

Labels

vstsPaired with ticket in vsts

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions