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(tags): Update loading + pagination for Tags Page #25473

Merged
merged 4 commits into from
Oct 5, 2023

Conversation

hughhhh
Copy link
Member

@hughhhh hughhhh commented Sep 30, 2023

SUMMARY

Added pagination to Tags.AllEntities page and fixed loading to stop flickering on component mounting

BEFORE/AFTER

Screenshot 2023-10-05 at 12 30 56 PM

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@hughhhh hughhhh changed the title fix(tags: Update loading + pagination for Tags Page fix(tags): Update loading + pagination for Tags Page Sep 30, 2023
@john-bodley
Copy link
Member

@hughhhh would you mind filling out the PR description.

const showListViewObjs =
objects.dashboard.length > 0 ||
objects.chart.length > 0 ||
objects.query.length > 0;

useEffect(() => {
console.log(search);
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
console.log(search);

// addDangerToast('Error Fetching Tagged Objects');
// logging.log(error.text);
// },
// );
Copy link
Member

Choose a reason for hiding this comment

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

was this intentional?

@@ -30,6 +30,7 @@ import { EmptyStateBig } from 'src/components/EmptyState';
import { fetchObjects } from '../tags/tags';

const MAX_TAGS_TO_SHOW = 3;
const PAGE_SIZE = 5;
Copy link
Member

Choose a reason for hiding this comment

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

Should this be 50, like before?

Copy link
Member Author

Choose a reason for hiding this comment

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

design wants this to be 10 since there are 3 tables on the 1 page

@pull-request-size pull-request-size bot added size/L and removed size/M labels Oct 4, 2023
fetchSingleTag(
tagId,
(tag: Tag) => {
setTag(tag);
setLoading(false);
},
(error: Response) => {
addDangerToast(t('Error Fetching Tagged Objects'));
Copy link
Member

@lilykuang lilykuang Oct 4, 2023

Choose a reason for hiding this comment

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

same as above

setLoading(false);
},
(error: Response) => {
addDangerToast('Error Fetching Tagged Objects');
Copy link
Member

Choose a reason for hiding this comment

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

you might need to add setLoading(false); here to prevent the spinner kept spinning

@hughhhh
Copy link
Member Author

hughhhh commented Oct 5, 2023

@yousoph @kasiazjc can you take a look at the page at 5 vs. 10 in our shortcut ticket and let me know what you think

@yousoph
Copy link
Member

yousoph commented Oct 5, 2023

@yousoph @kasiazjc can you take a look at the page at 5 vs. 10 in our shortcut ticket and let me know what you think

10 looked good to us!

Copy link
Member

@lilykuang lilykuang left a comment

Choose a reason for hiding this comment

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

LGTM

@hughhhh hughhhh merged commit 4532079 into apache:master Oct 5, 2023
28 checks passed
@hughhhh hughhhh deleted the tags-pagination branch October 5, 2023 17:46
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 3.1.0 labels Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/L 🚢 3.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants