Skip to content

ref(js): Factor button functionality #91763

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

Merged

Conversation

evanpurkhiser
Copy link
Member

  • Move useButtonFunctionality into it's own module, keeping index.tsx
    specifc to JUST what is required to render the Button, and not sharing
    anything with linkButton

  • Move common styles out of the index module into styles.tsx, renames
    index.chonk to styles.chonk as well.

  • Move common types into types.tsx

  • Renames getChonkButtonStyles to DO_NOT_USE_getChonkButtonStyles to
    match the DO_NOT_USE_getButtonStyles

@evanpurkhiser evanpurkhiser requested a review from a team as a code owner May 15, 2025 19:04
@evanpurkhiser evanpurkhiser requested review from JonasBa and removed request for a team May 15, 2025 19:04
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label May 15, 2025
@evanpurkhiser evanpurkhiser requested review from a team and removed request for JonasBa May 15, 2025 19:22
@evanpurkhiser evanpurkhiser force-pushed the evanpurkhiser/ref-js-factor-button-functionality branch from d28bc1c to 4a6ad58 Compare May 15, 2025 19:23
- Move `useButtonFunctionality` into it's own module, keeping index.tsx
  specifc to JUST what is required to render the Button, and not sharing
  anything with linkButton

- Move common styles out of the index module into styles.tsx, renames
  index.chonk to styles.chonk as well.

- Move common types into types.tsx

- Renames `getChonkButtonStyles` to `DO_NOT_USE_getChonkButtonStyles` to
  match the `DO_NOT_USE_getButtonStyles`
@evanpurkhiser evanpurkhiser force-pushed the evanpurkhiser/ref-js-factor-button-functionality branch from 4a6ad58 to d244645 Compare May 19, 2025 15:07
@evanpurkhiser evanpurkhiser requested a review from TkDodo May 19, 2025 15:07
}

export type ButtonProps = ButtonPropsWithoutAriaLabel | ButtonPropsWithAriaLabel;
export type {ButtonProps};
Copy link
Member Author

Choose a reason for hiding this comment

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

Re-export as the canonical place to get these props

@evanpurkhiser evanpurkhiser merged commit 91a541f into master May 20, 2025
41 checks passed
@evanpurkhiser evanpurkhiser deleted the evanpurkhiser/ref-js-factor-button-functionality branch May 20, 2025 12:52
jan-auer added a commit that referenced this pull request May 20, 2025
* master: (58 commits)
  link: cleanup link (#91687)
  ref: create project_id index for organizationonboardingtask (#91918)
  storybook: smaller last edited (#91875)
  issues: fix chonk stacktrace alignment (#91891)
  alert: drop custom alert (#91892)
  insights: fix bar height (#91895)
  ref(span-buffer): Move max-memory-percentage to right CLI (#91924)
  ref(js): Factor button functionality (#91763)
  tests(resolve_groups): Clean up the tests (#91779)
  ref(span-buffer): Add backpressure (#91707)
  fix(nextjs-insights): project id is not passed to explore link (#91920)
  fix(crons): Floor seconds / microsecond on recorded dateClock (#91890)
  fix(uptime): Fix bug with the uptime_checks dataset in the events endpoint (#91824)
  ref: add state-only migration to reflect existing indexes in prod (#91901)
  ref: remove unnecssary metaclass (#91906)
  fix(stats): use data category title name (#91913)
  feat(issues): Add success messages to some actions (#91899)
  test(taskworker): Lower exec time (#91907)
  chore(aci): manually add spans for delayed workflow processing (#91908)
  chore(aci): remove uses of WorkflowFireHistory rollout columns (#91904)
  ...
andrewshie-sentry pushed a commit that referenced this pull request May 20, 2025
- Move `useButtonFunctionality` into it's own module, keeping index.tsx
  specifc to JUST what is required to render the Button, and not sharing
  anything with linkButton

- Move common styles out of the index module into styles.tsx, renames
  index.chonk to styles.chonk as well.

- Move common types into types.tsx

- Renames `getChonkButtonStyles` to `DO_NOT_USE_getChonkButtonStyles` to
  match the `DO_NOT_USE_getButtonStyles`
Copy link

sentry-io bot commented May 26, 2025

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ Error: Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops. /issues/trace/:traceSlug/ View Issue
  • ‼️ InternalServerError: POST /organizations/{orgSlug}/dashboards/ 500 /dashboards/ View Issue

Did you find this useful? React with a 👍 or 👎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants