Skip to content

refactor: Ensure all setFocus methods return calls to setFocus#7287

Merged
driskull merged 8 commits intomainfrom
dris0000/setFocus-refactor-return-setFocus
Jul 7, 2023
Merged

refactor: Ensure all setFocus methods return calls to setFocus#7287
driskull merged 8 commits intomainfrom
dris0000/setFocus-refactor-return-setFocus

Conversation

@driskull
Copy link
Copy Markdown
Member

@driskull driskull commented Jul 6, 2023

Related Issue: #7270

Summary

For consistency, components implementing setFocus that end up calling setFocus on internal, supporting components should return the promise from this method call.

@github-actions github-actions Bot added the refactor Issues tied to code that needs to be significantly reworked. label Jul 6, 2023
# Conflicts:
#	packages/calcite-components/src/components/list/list.tsx
#	packages/calcite-components/src/components/navigation/navigation.tsx
#	packages/calcite-components/src/tests/commonTests.ts
@driskull driskull marked this pull request as ready for review July 6, 2023 19:16
@driskull driskull requested a review from a team as a code owner July 6, 2023 19:16
@driskull driskull requested a review from jcfranco July 6, 2023 20:25
Copy link
Copy Markdown
Member

@jcfranco jcfranco left a comment

Choose a reason for hiding this comment

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

Awesome! 👓

I just noticed that we could also await vs return if that's simpler/more consistent, but I could go either way.

@driskull driskull added the pr ready for visual snapshots Adding this label will run visual snapshot testing. label Jul 7, 2023
@driskull driskull merged commit 4d60f54 into main Jul 7, 2023
@driskull driskull deleted the dris0000/setFocus-refactor-return-setFocus branch July 7, 2023 21:55
@github-actions github-actions Bot added this to the 2023 July Priorities milestone Jul 7, 2023
benelan added a commit that referenced this pull request Jul 7, 2023
* origin/main: (22 commits)
  refactor: Ensure all setFocus methods return calls to setFocus (#7287)
  chore: release next
  fix(card): ensure teardown logic is called when disconnected (#7289)
  test: stabilize tests using setFocus (#7295)
  docs: Add implementation example to `skipAnimations` util (#7293)
  docs: Add implementation example to `visualizeMouseCursor` util (#7292)
  feat: improve focus behavior in components (#7277)
  refactor(popover): renames private method (#7286)
  build(deps): Bump focus-trap from 7.4.3 to 7.5.2 (#7279)
  chore: release next
  fix(flow): Call setFocus() on back button click (#7285)
  chore: release next
  feat(flow): Adds setFocus method (#7252)
  chore: release next
  build(deps): Bump autoprefixer from 10.4.13 to 10.4.14 (#7280)
  build(deps): Bump eslint and @types/eslint (#7282)
  fix(list): fix keyboard navigation after a listItem's disabled or closed property changes (#7275)
  fix(action): correctly focus the button after rendering updates. (#7255)
  chore: release next
  fix(tab-title): add full focus outline to closable tab button in high contrast mode (#7272)
  ...
benelan added a commit that referenced this pull request Jul 12, 2023
* origin/main:
  chore: release next
  fix(block): loader now appears for all loading cases (#7303)
  build: update browserslist db (#7301)
  build(deps): Bump eslint-plugin-jsdoc from 46.2.6 to 46.4.3 (#7306)
  build(deps): Bump @floating-ui/dom from 1.4.3 to 1.4.4 in /packages/calcite-components (#7305)
  build(deps): Bump chromatic from 6.19.5 to 6.19.9 (#7308)
  build(deps): Bump cpy-cli from 4.2.0 to 5.0.0 (#7281)
  chore: release next
  feat(text-area): provide additional context for AT users when character limit exceeds (#7299)
  build(deps): Bump stylelint from 14.16.1 to 15.10.1 (#7296)
  chore: release next
  ci: allow lint-staged to find typescript parser config file (#7297)
  fix(accordion, accordion-item): `icon-position`, `icon-type`, `selection-mode` and `scale` can now be set as props or attributes (#7191)
  test(stack): stabilize screenshot tests (#7298)
  build: make sure eslint-plugin-calcite-components is set up correctly (#7294)
  chore: add translations (#7290)
  refactor: Ensure all setFocus methods return calls to setFocus (#7287)
  chore: release next
  fix(card): ensure teardown logic is called when disconnected (#7289)
  test: stabilize tests using setFocus (#7295)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr ready for visual snapshots Adding this label will run visual snapshot testing. refactor Issues tied to code that needs to be significantly reworked.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants