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

Add methods to load / refresh a TabContainer directly #2930

Merged
merged 15 commits into from
Oct 7, 2022

Conversation

TomTirapani
Copy link
Member

See issue: #2406

Hoist P/R Checklist

Pull request authors: Review and check off the below. Items that do not apply can also be
checked off to indicate they have been considered. If unclear if a step is relevant, please leave
unchecked and note in comments.

  • Caught up with develop branch as of last change.
  • Added CHANGELOG entry, or determined not required.
  • Reviewed for breaking changes, added breaking-change label + CHANGELOG if so.
  • Updated doc comments / prop-types, or determined not required.
  • Reviewed and tested on Mobile, or determined not required.
  • Created Toolbox branch / PR, or determined not required.

If your change is still a WIP, please use the "Create draft pull request" option in the split
button below to indicate it is not ready yet for a final review.

Pull request reviewers: when merging this P/R, please consider using a squash commit to
collapse multiple intermediate commits into a single commit representing the overall feature
change. This helps keep the commit log clean and easy to scan across releases. PRs containing a
single commit should be rebased when possible.

// Trigger load / refreshes of TabContainer directly.
// Note that we are intentionally *not* implementing LoadSupport here.
//-----------------------------
async loadAsync(loadSpec) {
Copy link
Member

Choose a reason for hiding this comment

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

Don't fully understand this change, and would like to discuss, but it does seem to me that you should only need to override loadAsync and everything else should follow.

@lbwexler
Copy link
Member

lbwexler commented Apr 5, 2022

@TomTirapani -- Looks appealingly simple! Looking forward to discussing. Am a little concerned about unexpected effect of adding so many new RefreshContext's in, but it makes a lot of sense.

@TomTirapani
Copy link
Member Author

TomTirapani commented May 13, 2022

I just came across another use-case for this in a client app (I was able to work around it)

@amcclain
Copy link
Member

amcclain commented Oct 7, 2022

Tried (and failed) to get the bundled yarn to stop showing up here as a diff, but I don't think anything actually changed. (Some line ending thing, maybe?)

@TomTirapani
Copy link
Member Author

I fixed it with git checkout 2e9b578a4db1a4e9a7c1a3f75cd6a0101234cb91 -- .yarn/releases/yarn-1.22.19.cjs

@lbwexler
Copy link
Member

lbwexler commented Oct 7, 2022

I still have a lingering question about whether we should have TabContainerModel delegate its doLoadAsync to this model. Seems like as an API user I would expect to just call refresh methods directly on the TabContainerModel, but am concerned we are somehow going to get double loading.

@lbwexler
Copy link
Member

lbwexler commented Oct 7, 2022

tom reminded me that we discussed this at length in the spring, and we actually decided not to do that delegation, after originally trying it.

We agreed to merge this as is so we can get the benefits of the new refreshContextModel, and shake out any issues. Can put a comment in the code, about potentially taking it further with a delegation.

@lbwexler lbwexler merged commit ac25412 into develop Oct 7, 2022
@lbwexler lbwexler deleted the tabContainerLoad branch October 7, 2022 14:25
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.

3 participants