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

Use Prettier on Templates #8161

Merged
merged 3 commits into from
Sep 27, 2024
Merged

Conversation

jrjohnson
Copy link
Member

Activating ember-template-lint-plugin-prettier and running the fixer on all templates, including those in tests.

These are technically in javascipt, but by using prettier for both hbs
and js we get a nice set of updates here as well.
@jrjohnson jrjohnson added the run ui tests Run the expensive UI tests label Sep 26, 2024
assert.strictEqual(component.text, '');

await render(hbs`<TruncateText></TruncateText>
`);
await render(hbs`<TruncateText />`);
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we want to make changes like this.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm surprised this was done too, these are identical expressions though. I guess it makes sense?

Copy link
Member

Choose a reason for hiding this comment

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

less is more. i'm good with that. go prettier!

Comment on lines +27 to +29
await render(hbs`<TruncateText>
{{this.shortText}}
</TruncateText>`);
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess this is an improvement, but it still seems awkward.

Copy link
Member Author

Choose a reason for hiding this comment

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

One of the best/worst things about prettier is that it makes a bunch of choices for you. Sometimes they're awesome, sometimes you hate them. I try and lean into the good part - we don't have to make any of these decisions ourselves.

@jrjohnson
Copy link
Member Author

Lots of Percy diffs, some of them seem relevant and weird. Going to dig in further. Might just be that we need a new set of current screen shots to compare to.

@jrjohnson
Copy link
Member Author

Hand checked a bunch of these, and Percy is just out of sync with all the big changes we made today. Will re-run this tomorrow and compare to the nightly update from building master.

@jrjohnson jrjohnson marked this pull request as ready for review September 27, 2024 14:49
Copy link
Member

@stopfstedt stopfstedt left a comment

Choose a reason for hiding this comment

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

looks better to me.

Copy link
Contributor

@michaelchadwick michaelchadwick left a comment

Choose a reason for hiding this comment

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

If tests pass, and the formatting of templates is consistent, I can work with it.

@michaelchadwick michaelchadwick assigned dartajax and unassigned dartajax Sep 27, 2024
@michaelchadwick michaelchadwick merged commit 5a57482 into ilios:master Sep 27, 2024
42 checks passed
@jrjohnson jrjohnson deleted the tmplate-prettier branch September 27, 2024 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run ui tests Run the expensive UI tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants