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: toStyle, convert minWidth to min-width #149

Merged
merged 4 commits into from
Apr 19, 2023

Conversation

nicolechung
Copy link
Contributor

Description

Some folks are having issues rendering the columns minWidth style because they style tag looks like:

style="minWidth: 40px"

Instead of:

style="min-width: 40px"

This hopefully fixes that?

@changeset-bot
Copy link

changeset-bot bot commented Apr 14, 2023

🦋 Changeset detected

Latest commit: f2a47bf

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
ember-headless-table Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Apr 14, 2023

Copy link
Contributor

@NullVoxPopuli NullVoxPopuli left a comment

Choose a reason for hiding this comment

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

lgtm.

you'll want to add a changeset entry though

@NullVoxPopuli
Copy link
Contributor

Hopefully unblocking: #150

Copy link

@simonihmig simonihmig left a comment

Choose a reason for hiding this comment

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

Approved, but as Preston noted, this should have a changelog entry, and cause a version bump, otherwise we can't get this released (I think?):

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Copy link
Contributor

@ynotdraw ynotdraw left a comment

Choose a reason for hiding this comment

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

Looks good to me as well. I'm curious if we have any tests around this as well?

@nicolechung
Copy link
Contributor Author

Looks good to me as well. I'm curious if we have any tests around this as well?

Yeah I think it might be this test: https://github.com/CrowdStrike/ember-headless-table/blob/main/test-app/tests/plugins/sticky-columns/rendering-rfc-883-test.gts

Will take a look at updating it...looks like we test there for stickiness but not the mid-width computed style

await helpers.scrollRight(200);

/**
* Because we only scrolled the distance of one column for this test,
* it doesn't make sense to check the other columns.
*/
left = leftPositionOf('A');
await this.pauseTest();
Copy link
Contributor

Choose a reason for hiding this comment

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

a stray pause!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I know...I am having issues running the tests locally...see below:

Screenshot 2023-04-18 at 1 59 36 PM

To get around this, I was using CI and dropping in console.logs but forgot to remove this pauseTest initially.

Then I realized pnpm test:ember still works and realized I was pausing tests.

Copy link
Contributor

Choose a reason for hiding this comment

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

This looks a lot like an issue with ember-auto-import, where @cached isn't defined.
See: embroider-build/ember-auto-import#504

Make sure you're using ember-auto-import@^2.6.2

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you SO MUCH!! This fixes it...going to put up another PR for this.

@nicolechung nicolechung force-pushed the fix_minWidth_in_style_helper branch 3 times, most recently from 418eb90 to 452bec9 Compare April 18, 2023 19:09
@nicolechung nicolechung merged commit 8b8f170 into main Apr 19, 2023
@nicolechung nicolechung deleted the fix_minWidth_in_style_helper branch April 19, 2023 20:30
@github-actions github-actions bot mentioned this pull request Apr 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants