From b4927a0ecba8d7dd52e2a739e937202ac6efb9a6 Mon Sep 17 00:00:00 2001 From: Chloe Rice Date: Thu, 3 Aug 2023 13:39:46 -0400 Subject: [PATCH 1/2] [Pagination] Prefer tooltip position below the buttons --- .changeset/five-toes-hammer.md | 5 +++++ .../src/components/Pagination/Pagination.tsx | 12 ++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 .changeset/five-toes-hammer.md diff --git a/.changeset/five-toes-hammer.md b/.changeset/five-toes-hammer.md new file mode 100644 index 00000000000..65fb5420fdf --- /dev/null +++ b/.changeset/five-toes-hammer.md @@ -0,0 +1,5 @@ +--- +'@shopify/polaris': patch +--- + +Set the preferred position of `Pagination` button tooltips to `below` diff --git a/polaris-react/src/components/Pagination/Pagination.tsx b/polaris-react/src/components/Pagination/Pagination.tsx index a40f61b475b..e66da28dc3a 100644 --- a/polaris-react/src/components/Pagination/Pagination.tsx +++ b/polaris-react/src/components/Pagination/Pagination.tsx @@ -91,7 +91,11 @@ export function Pagination({ ); const constructedPrevious = previousTooltip && hasPrevious ? ( - + {prev} ) : ( @@ -111,7 +115,11 @@ export function Pagination({ ); const constructedNext = nextTooltip && hasNext ? ( - + {next} ) : ( From db57f3fe8b232c50fd7ecddf0f25788d4d4276a1 Mon Sep 17 00:00:00 2001 From: Chloe Rice Date: Fri, 4 Aug 2023 13:31:29 -0400 Subject: [PATCH 2/2] [Page][ActionMenu] Prefer tooltip position below secondary action --- .changeset/five-toes-hammer.md | 2 +- .../ActionMenu/components/SecondaryAction/SecondaryAction.tsx | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.changeset/five-toes-hammer.md b/.changeset/five-toes-hammer.md index 65fb5420fdf..e2e74f9f922 100644 --- a/.changeset/five-toes-hammer.md +++ b/.changeset/five-toes-hammer.md @@ -2,4 +2,4 @@ '@shopify/polaris': patch --- -Set the preferred position of `Pagination` button tooltips to `below` +Set the preferred position of `Pagination` and `Page` `secondaryActions` button tooltips to `below` diff --git a/polaris-react/src/components/ActionMenu/components/SecondaryAction/SecondaryAction.tsx b/polaris-react/src/components/ActionMenu/components/SecondaryAction/SecondaryAction.tsx index 881e4aaa9d8..fb4a316e666 100644 --- a/polaris-react/src/components/ActionMenu/components/SecondaryAction/SecondaryAction.tsx +++ b/polaris-react/src/components/ActionMenu/components/SecondaryAction/SecondaryAction.tsx @@ -36,7 +36,9 @@ export function SecondaryAction({ ); const actionMarkup = helpText ? ( - {buttonMarkup} + + {buttonMarkup} + ) : ( buttonMarkup );