-
Notifications
You must be signed in to change notification settings - Fork 76
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(stepper-item): no longer refer numberingSystem from neighbor stepper component #6380
fix(stepper-item): no longer refer numberingSystem from neighbor stepper component #6380
Conversation
@@ -143,7 +143,8 @@ export class Stepper { | |||
event.stopPropagation(); | |||
} | |||
|
|||
@Listen("calciteInternalStepperItemRegister") registerItem(event: CustomEvent): void { | |||
@Listen("calciteInternalStepperItemRegister") | |||
registerItem(event: CustomEvent): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
made this change to avoid JSDOC warning . unrelated to the issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean linting warning?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup. linting warning.
@@ -153,7 +154,8 @@ export class Stepper { | |||
event.stopPropagation(); | |||
} | |||
|
|||
@Listen("calciteInternalStepperItemSelect") updateItem(event: CustomEvent): void { | |||
@Listen("calciteInternalStepperItemSelect") | |||
updateItem(event: CustomEvent): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
made this change to avoid JSDOC warning . unrelated to the issue.
await stepper2.click(); | ||
await page.waitForChanges(); | ||
await stepper1.click(); | ||
await page.waitForChanges(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Main reason behind adding clicks is to make sure we reproduce the error state. Error state can appear on initial render.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
I believe the issue is with the formatter cache itself, but this is good for the issue at hand. Adding @benelan to take a look.
If this looks good to merge, @anveshmekala, can you create an issue to fix the cache?
@@ -143,7 +143,8 @@ export class Stepper { | |||
event.stopPropagation(); | |||
} | |||
|
|||
@Listen("calciteInternalStepperItemRegister") registerItem(event: CustomEvent): void { | |||
@Listen("calciteInternalStepperItemRegister") | |||
registerItem(event: CustomEvent): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean linting warning?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
{numberStringFormatter.numberFormatter.format(this.itemPosition + 1)}. | ||
</div> | ||
) : null} | ||
{this.numbered ? <div class="stepper-item-number">{this.renderNumbers()}.</div> : null} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might want to move the numberStringFormatter check to the render block for all of its components to prevent similar bugs. It won't recreate a new NumberFormatter if the lang/numberingSystem is the same so putting the check in the render block won't be too expensive performance-wise.
I can do that in a follow up PR
Added an issue #6399. |
* origin/master: 1.0.4-next.5 fix(stepper-item): no longer refer numberingSystem from neighbor stepper component (#6380)
Related Issue: #6331
Summary
This PR will fix the issue of
stepper
component's numbers being localized to thenumberingSystem
specified by neighboringstepper
component rendered in same page.