-
Notifications
You must be signed in to change notification settings - Fork 50
Showcase: cleanup work from converting routes to gts #3296
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
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub.
|
61120e1
to
10ce05e
Compare
bf68393
to
3776998
Compare
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.
One small issue with the mock states, but everything else looks good to me.
return this.router?.currentURL?.includes('frameless') ?? false; | ||
} | ||
|
||
addMockStateClasses = modifier(() => { |
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.
[Issue] On route change the mock classes aren't getting added. If I go to the accordion route from the homepage, the mock states aren't present for the card. If I refresh the accordion page, then the modifier is getting called. Locally I added back some of the original app controller logic for calling addMockStateClasses
on route change and that seemed to fix it.
constructor(owner: Owner, args: Record<string, never>) {
super(owner, args);
this.router.on('routeDidChange', this.routeDidChange.bind(this));
}
routeDidChange = () => {
// eslint-disable-next-line ember/no-runloop
scheduleOnce('afterRender', this, this.addMockStateClasses.bind(this));
}
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.
Just checked the percy diff and it is also not picking up the states as expected.
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.
Ah I got over eager with modifiers and forgot they only run when the component is initially put in the dom. Changed it back to use routeDidChange
.
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.
Looks good on route change, but think we still need the modifier to set it on reload.
get isFrameless() { | ||
return this.router?.currentURL?.includes('frameless') ?? false; | ||
} | ||
addMockStateClasses = () => { |
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.
[Issue] This is working on route change, and in percy now, but on reload the state is getting removed and not shown. Think we still need the modifier for that.
📌 Summary
If merged, this PR would some small tasks related to converting the showcase to gts format:
model-from-route
file name/page-{name}
because we don't have templates for those routesNote: Each of these changes is broken into its own commit so its easier to review.
👀 Component checklist
💬 Please consider using conventional comments when reviewing this PR.
📋 PCI review checklist
Examples of changes to controls include access controls, encryption, logging, etc.
Examples include changes to operating systems, ports, protocols, services, cryptography-related components, PII processing code, etc.