-
Notifications
You must be signed in to change notification settings - Fork 47.3k
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
[activity] rename unstable_Offscreen to unstable_Activity #27640
Conversation
Comparing: a17467e...9f6a8bf Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: (No significant changes) |
would it make sense to leave the |
I'm curious, what's the rationale / intent behind the name change? |
This is an unexpected name change. Any link to discussion around the motivations for this rename? Didn't see anything in the RFC repo. |
An unreleased feature could change name many times more before release. We don’t use the RFC repo as the process anymore. It should probably indicate as such. |
I wasn’t saying the name change was a problem, just that it was unexpected. “Activity” seems like an odd choice so I’d be interested in learning more about the reasoning that went into it. |
At all or for this particular feature? |
- facebook/react#27641 - facebook/react#27661 - facebook/react#27640 - facebook/react#27595 - facebook/react#27600 - facebook/react#27598 - facebook/react#27590 - facebook/react#27606 - facebook/react#27608 - facebook/react#27601 - facebook/react#27616 - facebook/react#27615 - facebook/react#27614 - facebook/react#27599 - facebook/react#27597 - facebook/react#27525 - facebook/react#27571
Updates React from 08a39539f to 2983249dd. ### React upstream changes - facebook/react#27641 - facebook/react#27661 - facebook/react#27640 - facebook/react#27595 - facebook/react#27600 - facebook/react#27598 - facebook/react#27590 - facebook/react#27606 - facebook/react#27608 - facebook/react#27601 - facebook/react#27616 - facebook/react#27615 - facebook/react#27614 - facebook/react#27599 - facebook/react#27597 - facebook/react#27525 - facebook/react#27571 Updates @types/react to 18.2.37 Updates @types/react-dom to 18.2.15
Seeing this being linked to so I want to answer the questions. (Apparently I can't write short answers; sorry!) In reactjs/rfcs#200, we reflected the reality at the time: we primarily used RFCs as a channel to announce practically finished APIs that have received sufficient vetting that we're very confident in them, but want to provide a last chance for feedback in case there's a new concern that hasn't ever come up at Meta (which happened!) We also used them as a way to communicate what the feature is—essentially its initial docs. As React started moving into a direction of being a multi-company project, incubating new features had to be open to the broader community — you see them available to frameworks for "incubation" too. So the moment you start "hearing" about a feature is much earlier now. The comparable situation at FB was when a couple of teams used a new feature. By that point it barely has any docs cause at first someone just needs to plug it into its first potential usage to see if the feature even works or makes sense. The big difference here is that we receive a lot of external feedback on these features from people who try to use them much earlier now. By the time we get to the stage where we'd previously publish an RFC, we've already received so much structured feedback from people having used it that we haven't prioritized filing RFCs, slipped a few times, and then tried to figure out if we can find a better process that provides clarity but keeps the feedback focused and actionable. The "canary" docs we have on the React site (which we now try to update as soon as something reasonable lands on This summer, we also wanted to tighten up our process in general, and try something closer to the TC39 staging system. Our process used to be more ad hoc — but now the team has grown enough that it's hard for everyone on the team to keep track of all the streams of work. As a reminder, this process has always been internal to the React team — so we're not speaking of closing something down; quite the opposite — the intention is to make those stages and the proposals moving between them public. The team was working on this in early August before pivoting to finish documenting the APIs already in Canaries, which was the most urgent feedback we've received about the community about what's missing. That work is just finishing now so I expect with some time, the team will formalize this stage-based process that it's currently piloting. As for this specific change, the community feedback on the previous name "offscreen" was overwhelmingly that people thought it has something to do with things literally being offscreen (like under the viewport). That was not what the feature was originally (and is currently) doing — it was for marking some parts of the app as essentially inactive, for example, a tab you moved away from or a history stack entry. So it's "offscreen" in the sense of "we might have some state and DOM for it stashed away but it's not being explicitly displayed to the user in the current tree". So that's something more like "inert" than "offscreen". However, we also started using this feature in a more generic way, e.g. for pre-rendering experiments on React Native. There, the purpose is to render the components ahead of time (before the user actually opens the tab) but only spending CPU on that when otherwise idle and delaying all Effects from running. So it's kind of like "prewarming". We also talked about other potential patterns where e.g. the modal becomes "active" and the stuff below it becomes more "inactive" (state updates outside the modal can be deprioritized compared to updates inside the modal). There was also more discussion about how this feature seems like it could be the way to control progressive hydration (which currently requires wrapping into Suspense even when it doesn't make sene). As well as something that could be integrated with The naming is not set in stone, but the old one was definitely wrong, and I the intention from the PR authors was to update it to our next best guess for what it might be called. I don't think it currently has the same API as the latest idea so this wasn't meant to look like a final call on the name or the behavior or its prop names (which might be outdated). This PR is a partial rename of a feature that changed in scope a few times, from the Meta side of the team that is currently dogfooding this feature (and providing feedback on its design to the broader React team). Unreleased APIs can churn like this many times before someone writes up a proper public-visible doc for it that's worth discussing and is able to engage with the feedback. I get that this is frustrating but it's not different at our level of commitment to features that are not yet shipped in Canaries. Hope this helps. Sorry for super long post but I thought there's a lot to go over here. |
Thanks for the response @gaearon, I think most people appreciate your longer answers! |
That perspective on the rename makes sense. Thanks, Dan. |
Hello, may I ask when will this feature release the canary version? |
This should allow us to remove the `react-prod-sourcemaps` Webpack plug-in, which is a step toward unblocking a potential Webpack to Turbo migration. I think the biggest change on the React side was renaming `unstable_Offscreen` to `unstable_Acitivy` -> facebook/react#27640 - [x] Update `react` and `react-dom` packages - [x] Replace all `unstable_Offscreen` references with `unstable_Activity` - [x] Update `next.config` to include `react` and `react-dom` source-maps in bundle - [x] Remove `@acemarke/react-prod-sourcemaps` Webpack plug-in - [x] Verify production deploy (still) has source-maps for `react` and `react-dom` - [x] Update `breakpoints-01` golden recording to one created from this PR - [x] Update `logpoints-10` and `logpoints-11` tests as needed to account for line number changes
…7640) `Activity` is the current candidate name. This PR starts the rename work by renaming the exported unstable component name. NOTE: downstream consumers need to rename the import when updating to this commit.
`Activity` is the current candidate name. This PR starts the rename work by renaming the exported unstable component name. NOTE: downstream consumers need to rename the import when updating to this commit. DiffTrain build for commit ce2bc58.
Activity
is the current candidate name. This PR starts the rename work by renaming the exported unstable component name.NOTE: downstream consumers need to rename the import when updating to this commit.