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

do not show loaded tabs before showing current tab #6424

Merged
merged 8 commits into from
Mar 15, 2023
Merged

Conversation

davetsay
Copy link
Contributor

@davetsay davetsay commented Mar 14, 2023

Closes #6387

Describe your changes:

  • Do not show any tabs until show current tab logic is fired
  • Show the first tab by default if no current tab

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Is this change backwards compatible? For example, developers won't need to change how they are calling the API or how they've extended core plugins such as Tables or Plots.

Author Checklist

  • Changes address original issue?
  • Tests included and/or updated with changes?
  • Command line build passes?
  • Has this been smoke tested?
  • Testing instructions included in associated issue OR is this a dependency/testcase change?

Reviewer Checklist

  • Changes appear to address issue?
  • Reviewer has tested changes by following the provided instructions?
  • Changes appear not to be breaking changes?
  • Appropriate automated tests included?
  • Code style and in-line documentation are appropriate?
  • Has associated issue been labelled unverified? (only applicable if this PR closes the issue)
  • Has associated issue been labelled bug? (only applicable if this PR is for a bug fix)

@codecov
Copy link

codecov bot commented Mar 14, 2023

Codecov Report

Merging #6424 (9636b70) into master (22cc28d) will decrease coverage by 0.11%.
The diff coverage is 57.14%.

❗ Current head 9636b70 differs from pull request most recent head 862b6ec. Consider uploading reports for the commit 862b6ec to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6424      +/-   ##
==========================================
- Coverage   54.78%   54.67%   -0.11%     
==========================================
  Files         620      620              
  Lines       26518    26523       +5     
  Branches     2399     2400       +1     
==========================================
- Hits        14528    14502      -26     
- Misses      11341    11370      +29     
- Partials      649      651       +2     
Flag Coverage Δ *Carryforward flag
e2e-ci 39.39% <ø> (-0.02%) ⬇️ Carriedforward from 9108658
e2e-full 51.14% <ø> (-0.02%) ⬇️ Carriedforward from 9108658
e2e-stable 54.37% <ø> (-0.29%) ⬇️
unit 49.16% <57.14%> (-0.07%) ⬇️

*This pull request uses carry forward flags. Click here to find out more.

Impacted Files Coverage Δ
src/plugins/tabs/components/tabs.vue 37.20% <57.14%> (+1.20%) ⬆️

... and 26 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 22cc28d...862b6ec. Read the comment docs.

Copy link
Contributor

@shefalijoshi shefalijoshi left a comment

Choose a reason for hiding this comment

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

Looks good!
Please add a test for it.

@davetsay
Copy link
Contributor Author

e2e test to be covered in #6425

@@ -123,6 +123,7 @@ export default {
this.composition.on('remove', this.removeItem);
this.composition.on('reorder', this.onReorder);
this.composition.load().then(() => {
this.setCurrentTab = true;
Copy link
Contributor

Choose a reason for hiding this comment

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

This will also catch the case where the composition is empty and someone adds stuff to it after the view is mounted right?
OR if there is an error loading the composition?

Copy link
Contributor Author

@davetsay davetsay Mar 15, 2023

Choose a reason for hiding this comment

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

good catch. i need to conditionally set this.setCurrentTab = true if composition is empty.

Copy link
Contributor

@shefalijoshi shefalijoshi left a comment

Choose a reason for hiding this comment

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

Looks good!

Copy link
Contributor

@shefalijoshi shefalijoshi left a comment

Choose a reason for hiding this comment

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

One small issue.

TabsViewNotVisible.mov

In fixed timespan mode:
Add a few objects to the tabs view
Make sure that generally the right tab shows up as you navigate away and back.
Using the navigation tree, remove all objects from the tabs view composition and then navigate away to another object and come back to the empty tabs view.
Add an object to the view (or 2 objects). Newly added objects are not visible.
Manually selecting a tab does resolve this.

@davetsay
Copy link
Contributor Author

@shefalijoshi . nice catch. pushed fix. i'll search to see if we have an issue filed for that.

@shefalijoshi shefalijoshi enabled auto-merge (squash) March 15, 2023 22:22
@shefalijoshi shefalijoshi merged commit 0b3e0e7 into master Mar 15, 2023
@shefalijoshi shefalijoshi deleted the fix/6387 branch March 15, 2023 22:29
@ozyx ozyx added this to the Target:2.2.0 milestone Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Tabs] in eager load mode, only load the selected tab on tabs view load
3 participants