Skip to content

Conversation

oliviertassinari
Copy link
Member

@oliviertassinari oliviertassinari commented Sep 4, 2025

Simplify the changelog generation after I broke it. Help with #2615:

  • Reduce the list of labels that we need to care about. Only docs, internal, test, and dependencies would force to ignore of a product scope label applied.
  • Fix the "all component" scope generation.
  • Only look at the "scope: " labels for the generation of the changelog.

And one potentially controversial change:

  • Add an exception to the logic for the combobox product scope. The bet is that in practice, we very largely work on both <Autocomplete> and <Combobox> at the same time (my experience with this in Material UI), so it's actually simpler to have one "scope: autocomplete" + component labels when we want to be more granular (not frequent).
    The alternative would be to: 1. remove this custom logic, 2. rename component: Combobox to scope: combobox, and 3. rename component: Autocomplete to scope: autocomplete.

As far as I could test this PR, the generation is correct (relative to what we did for beta.3)

One step toward mui/mui-public#639

@oliviertassinari oliviertassinari added type: regression A bug, but worse, it used to behave as expected. internal Behind-the-scenes enhancement. Formerly called “core”. labels Sep 4, 2025
Copy link

pkg-pr-new bot commented Sep 4, 2025

Open in StackBlitz

pnpm add https://pkg.pr.new/mui/base-ui/@base-ui-components/react@2635
pnpm add https://pkg.pr.new/mui/base-ui/@base-ui-components/utils@2635

commit: 04e4903

Copy link

netlify bot commented Sep 4, 2025

Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit 04e4903
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/68b994e2cefcaf0008535124
😎 Deploy Preview https://deploy-preview-2635--base-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@oliviertassinari oliviertassinari force-pushed the improve-changelog-generation branch from 60dba7e to 04e4903 Compare September 4, 2025 13:32
@mui-bot
Copy link

mui-bot commented Sep 4, 2025

Bundle size report

Bundle Parsed size Gzip size
@base-ui-components/react 0B(0.00%) 0B(0.00%)

Details of bundle changes

Comment on lines -323 to +333
type ChangeScope = 'docs' | 'infra' | 'public-api' | 'internal' | 'dependencies' | 'release';
type ChangelogEntryGroup = 'public-change-group-1' | 'internal-change';
Copy link
Member Author

Choose a reason for hiding this comment

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

Rename "scope" to avoid confusion; it's not a product scope, it's more of a first level of grouping.

Comment on lines 13 to 17
```diff
-onOpenChange: (open, event, reason) => {
+onOpenChange: (open, eventDetails) => {
- if (reason === 'escape-key') {
+onOpenChange: (open, eventDetails) => {
+ if (eventDetails.reason === 'escape-key') {
Copy link
Member Author

Choose a reason for hiding this comment

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

The correct git diff output.

changelogEntries.filter((entry) => entry.scope === 'public-api'),
format,
);
const changesList = getFormattedChangelogEntries(changelogEntries, format);
Copy link
Member Author

Choose a reason for hiding this comment

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

Move the logic to as late as we need it, keeping top-level code about high-level flow control.

prNumber,
author: commit.author,
group: getGroupFromLabels(labels),
components: getComponentsFromLabels(labels),
Copy link
Member Author

Choose a reason for hiding this comment

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

To scale the generation to cover other repositories, we would probably do a change like this:

Suggested change
components: getComponentsFromLabels(labels),
subGroups: getSubGroupsFromLabels(labels),

subGroups can be components, but also an npm packages for a given change, so the current terminology would be a bit too narrow.

@michaldudak
Copy link
Member

Add an exception to the logic for the combobox product scope. The bet is that in practice, we very largely work on both and at the same time (my experience with this in Material UI), so it's actually simpler to have one "scope: autocomplete" + component labels when we want to be more granular (not frequent).

What's the benefit of this? From the users' perspective, Autocomplete and Combobox are two separate components. They are imported from different paths, and they have separate documentation pages.
Quite often, we work on features/bug fixes that affect all "popup" components (Menu, Select, Popover, Tooltip, etc.), and yet we don't have a separate grouping scope for them. It's just simpler to specify which components are affected by a given PR explicitly (both for scripts and contributors/users).

@oliviertassinari
Copy link
Member Author

What's the benefit of this?

@michaldudak I will wait for what you guys want to do about points 4 and 6 in https://mui-org.slack.com/archives/C02P87NQLJC/p1757017036546399?thread_ts=1756997149.279849&cid=C02P87NQLJC to update the PR to match. It depends on the product scope labeling strategy picked for the combobox.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal Behind-the-scenes enhancement. Formerly called “core”. type: regression A bug, but worse, it used to behave as expected.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants