Skip to content

feat(TextInput): Update TextInput to use data attributes for styling - #5242

Merged
hussam-i-am merged 14 commits into
mainfrom
hussam-i-am/text-input-data-attrs
Nov 8, 2024
Merged

feat(TextInput): Update TextInput to use data attributes for styling#5242
hussam-i-am merged 14 commits into
mainfrom
hussam-i-am/text-input-data-attrs

Conversation

@hussam-i-am

Copy link
Copy Markdown
Contributor

Changelog

New

Changed

Removed

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; if selected, include a brief description as to why

Testing & Reviewing

Not sure if it is a known issue but it seems that passing in small for size does not currently do anything, whereas with the changes made, we are getting smaller inputs

Merge checklist

@hussam-i-amhussam-i-am self-assigned this Nov 6, 2024
@changeset-bot

changeset-botBot commented Nov 6, 2024

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 779c1f3

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

This PR includes changesets to release 1 package
NameType
@primer/reactMinor

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
Copy Markdown
Contributor

👋 Hi, this pull request contains changes to the source code that github/github depends on. If you are GitHub staff, we recommend testing these changes with github/github using the integration workflow. Thanks!

@github-actionsgithub-actionsBot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Nov 6, 2024
@github-actions
github-actionsBottemporarily deployed to storybook-preview-5242 November 6, 2024 17:21 Inactive
@github-actions

github-actionsBot commented Nov 6, 2024

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize
packages/react/dist/browser.esm.js98.55 KB (+0.06% 🔺)
packages/react/dist/browser.umd.js99.09 KB (+0.29% 🔺)

expect(defaultStyles).toEqual(expect.objectContaining(expectedStyles))
expect(blockStyles).not.toEqual(expect.objectContaining(expectedStyles))
expect(defaultStyles).not.toEqual(expect.objectContaining(expectedStyles))
expect(blockStyles).toEqual(expect.objectContaining(expectedStyles))

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Update so that variables accurately reflect what is being tests.

validationStatus?: FormValidationStatus
/** @deprecated Use `size` prop instead */
variant?: TextInputSizes
size?: TextInputSizes

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Moved into the base props since that is where they are being used

@github-actions
github-actionsBottemporarily deployed to storybook-preview-5242 November 7, 2024 00:10 Inactive
@hussam-i-am
hussam-i-am marked this pull request as ready for review November 7, 2024 00:17
@hussam-i-am
hussam-i-am requested a review from a team as a code ownerNovember 7, 2024 00:17
${minWidth}
${maxWidth}
${sx}
}

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Wrapped in & {...} to ensure it has greater specificity than data attributes for passed in sx prors

${sx};
& {
${sx}
}

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Wrapped in & {...} to ensure it has greater specificity than data attributes for passed in sx prors

@primer-integration

primer-integrationBot commented Nov 7, 2024

Copy link
Copy Markdown

🔴 golden-jobs completed with status failure.

@github-actionsgithub-actionsBot added integration-tests: failing Changes in this PR cause breaking changes in gh/gh and removed integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels Nov 7, 2024

@jonrohanjonrohan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this change looks good to me, wanna tag in @joshblack to get his review

@primer-integration

Copy link
Copy Markdown

👋 Hi from github/github! Your integration PR is ready: https://github.com/github/github/pull/350317

@hussam-i-am
hussam-i-am added this pull request to the merge queueNov 8, 2024
Merged via the queue into main with commit 706d272Nov 8, 2024
@hussam-i-am
hussam-i-am deleted the hussam-i-am/text-input-data-attrs branch November 8, 2024 17:49
@primerprimerBot mentioned this pull request Nov 8, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration-tests: failingChanges in this PR cause breaking changes in gh/gh

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@hussam-i-am@jonrohan