Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into remove-use-client
Browse files Browse the repository at this point in the history
  • Loading branch information
michaldudak committed Sep 4, 2024
2 parents 694612f + 30245d0 commit 3f2de1f
Show file tree
Hide file tree
Showing 1,583 changed files with 52,207 additions and 61,488 deletions.
17 changes: 10 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ default-job: &default-job
REACT_VERSION: << parameters.react-version >>
TEST_GATE: << parameters.test-gate >>
AWS_REGION_ARTIFACTS: eu-central-1
working_directory: /tmp/material-ui
working_directory: /tmp/base-ui
docker:
- image: cimg/node:18.20

Expand Down Expand Up @@ -89,7 +89,7 @@ commands:
corepack enable
- run:
name: Prepare playwright hash
command: pnpm list --json --filter playwright > /tmp/playwright_info.json
command: pnpm list --recursive --json --filter @mui-internal/tests playwright > /tmp/playwright_info.json
- store_artifacts:
name: Debug playwright hash
path: /tmp/playwright_info.json
Expand Down Expand Up @@ -156,7 +156,7 @@ jobs:
name: Should not have any git not staged
command: git add -A && git diff --exit-code --staged
- run:
name: Check for duplicated packages
name: '`pnpm dedupe` was run?'
command: |
# #default-branch-switch
if [[ $(git diff --name-status master | grep -E 'pnpm-workspace\.yaml|pnpm-lock.yaml|package\.json') == "" ]];
Expand Down Expand Up @@ -319,7 +319,7 @@ jobs:
<<: *default-job
resource_class: 'medium+'
docker:
- image: mcr.microsoft.com/playwright:v1.43.1-focal
- image: mcr.microsoft.com/playwright:v1.46.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand Down Expand Up @@ -350,7 +350,7 @@ jobs:
test_profile:
<<: *default-job
docker:
- image: mcr.microsoft.com/playwright:v1.43.1-focal
- image: mcr.microsoft.com/playwright:v1.46.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand Down Expand Up @@ -378,7 +378,7 @@ jobs:
test_regressions:
<<: *default-job
docker:
- image: mcr.microsoft.com/playwright:v1.43.1-focal
- image: mcr.microsoft.com/playwright:v1.46.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -395,13 +395,16 @@ jobs:
test_e2e:
<<: *default-job
docker:
- image: mcr.microsoft.com/playwright:v1.43.1-focal
- image: mcr.microsoft.com/playwright:v1.46.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
- checkout
- install_js:
browsers: true
- run:
name: install Playwright browsers
command: pnpm exec playwright install
- run:
name: pnpm test:e2e
command: pnpm test:e2e
Expand Down
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
/tmp
.next
build
build-tests
node_modules
.nyc_output
pnpm-lock.yaml
Expand Down
39 changes: 38 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
const baseline = require('@mui/monorepo/.eslintrc');
const path = require('path');

const OneLevelImportMessage = [
'Prefer one level nested imports to avoid bundling everything in dev mode or breaking CJS/ESM split.',
'See https://github.com/mui/material-ui/pull/24147 for the kind of win it can unlock.',
].join('\n');

module.exports = {
...baseline,
settings: {
Expand All @@ -16,8 +21,30 @@ module.exports = {
*/
rules: {
...baseline.rules,
// TODO move to @mui/monorepo, codebase is moving away from default exports
// TODO move to @mui/monorepo, codebase is moving away from default exports https://github.com/mui/material-ui/issues/21862
'import/prefer-default-export': 'off',
'import/export': 'off', // Mostly handled by Typescript itself. ESLint produces false positives with declaration merging.
'no-restricted-imports': [
'error',
{
patterns: [
{
group: [
'@mui/*/*/*',
'@pigment-css/*/*/*',
'@base_ui/react/*/*',
'!@base_ui/react/legacy/*',
// Allow any import depth with any internal packages
'!@mui/internal-*/**',
// TODO delete, @mui/docs should be @mui/internal-docs
'!@mui/docs/**',
],
message: OneLevelImportMessage,
},
],
},
],
'@typescript-eslint/no-redeclare': 'off',
},
overrides: [
...baseline.overrides,
Expand All @@ -30,5 +57,15 @@ module.exports = {
'no-console': 'off',
},
},
{
files: ['packages/**/*.test{.tsx,.js}'],
excludedFiles: 'packages/mui-base/src/legacy/**/*.*',
extends: ['plugin:testing-library/react'],
rules: {
'testing-library/prefer-screen-queries': 'off', // TODO: enable and fix
'testing-library/no-container': 'off', // TODO: enable and fix
'testing-library/render-result-naming-convention': 'off', // False positives
},
},
],
};
5 changes: 5 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
* @atomiks @michaldudak
/docs/data/ @atomiks @colmtuite @michaldudak
/examples/ @atomiks @colmtuite @michaldudak
/packages/mui-base/ @atomiks @colmtuite @michaldudak
/scripts/ @michaldudak
6 changes: 6 additions & 0 deletions .github/ISSUE_TEMPLATE/1.bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,9 @@ body:
Output from `npx @mui/envinfo` goes here.
```
</details>
- type: markdown
attributes:
value: |
## :heart: Love Base UI?
Consider donating $10 to sustain our open-source work: [https://opencollective.com/mui-org](https://opencollective.com/mui-org).
6 changes: 6 additions & 0 deletions .github/ISSUE_TEMPLATE/2.feature.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,9 @@ body:
attributes:
label: Motivation
description: What are you trying to accomplish? Providing context helps us come up with a solution that is more useful in the real world.
- type: markdown
attributes:
value: |
## :heart: Love Base UI?
Consider donating $10 to sustain our open-source work: [https://opencollective.com/mui-org](https://opencollective.com/mui-org).
6 changes: 6 additions & 0 deletions .github/ISSUE_TEMPLATE/4.docs-feedback.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,9 @@ body:
attributes:
label: Context
description: What are you trying to accomplish? Providing context helps us come up with a solution that is more useful in the real world.
- type: markdown
attributes:
value: |
## :heart: Love Base UI?
Consider donating $10 to sustain our open-source work: [https://opencollective.com/mui-org](https://opencollective.com/mui-org).
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
contact_links:
- name: Support ❔
url: https://mui.com/getting-started/support/
url: https://mui.com/base-ui/getting-started/support/
about: I need support with Base UI.
8 changes: 2 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ on:
# We don't need to run CI twice (push+pull_request)
- 'renovate/**'
pull_request:
paths-ignore:
# should sync with ci-check.yml as a workaround to bypass github checks
- 'docs/**'
- 'examples/**'

permissions: {}

Expand All @@ -25,14 +21,14 @@ jobs:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- run: echo "${{ github.actor }}"
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
# fetch all tags which are required for `pnpm release:changelog`
fetch-depth: 0
- name: Set up pnpm
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
- name: Use Node.js 18.x
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: 18
cache: 'pnpm' # https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#caching-packages-dependencies
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@d39d31e687223d841ef683f52467bd88e9b21c14 # v3.25.3
uses: github/codeql-action/init@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15
with:
languages: typescript
config-file: ./.github/codeql/codeql-config.yml
Expand All @@ -30,4 +30,4 @@ jobs:
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@d39d31e687223d841ef683f52467bd88e9b21c14 # v3.25.3
uses: github/codeql-action/analyze@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15
2 changes: 1 addition & 1 deletion .github/workflows/maintenance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
steps:
- run: echo "${{ github.actor }}"
- name: check if prs are dirty
uses: eps1lon/actions-label-merge-conflict@e62d7a53ff8be8b97684bffb6cfbbf3fc1115e2e # v3.0.0
uses: eps1lon/actions-label-merge-conflict@1b1b1fcde06a9b3d089f3464c96417961dde1168 # v3.0.2
with:
dirtyLabel: 'PR: out-of-date'
removeOnDirtyLabel: 'PR: ready to ship'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
persist-credentials: false

- name: Run analysis
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
with:
results_file: results.sarif
results_format: sarif
Expand All @@ -43,6 +43,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: Upload to code-scanning
uses: github/codeql-action/upload-sarif@d39d31e687223d841ef683f52467bd88e9b21c14 # v3.25.3
uses: github/codeql-action/upload-sarif@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15
with:
sarif_file: results.sarif
6 changes: 3 additions & 3 deletions .github/workflows/support-stackoverflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ jobs:
# Comment to post on issues marked as support requests. Add a link
# to a support page, or set to `false` to disable
issue-comment: |
👋 Thanks for using MUI Core!
👋 Thanks for using this project!
We use GitHub issues exclusively as a bug and feature requests tracker, however,
this issue appears to be a support request.
For support, please check out https://mui.com/getting-started/support/. Thanks!
For support with Base UI please check out https://mui.com/base-ui/getting-started/support/. Thanks!
If you have a question on Stack Overflow, you are welcome to link to it here, it might help others.
If you have a question on Stack Overflow, you are welcome to link to it here, it might help others.
If your issue is subsequently confirmed as a bug, and the report follows the issue template, it can be reopened.
close-issue: true
lock-issue: false
2 changes: 1 addition & 1 deletion .github/workflows/vale-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: errata-ai/vale-action@38bf078c328061f59879b347ca344a718a736018 # v2.1.0
continue-on-error: true
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
# created by netlify dev (to perform local debug)
.netlify
build
build-tests
node_modules
package-lock.json
size-snapshot.json
Expand Down
6 changes: 5 additions & 1 deletion .mocharc.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ module.exports = {
recursive: true,
timeout: (process.env.CIRCLECI === 'true' ? 5 : 2) * 1000, // Circle CI has low-performance CPUs.
reporter: 'dot',
require: ['@mui/internal-test-utils/setupBabel', '@mui/internal-test-utils/setupJSDOM'],
require: [
'@mui/internal-test-utils/setupBabel',
'@mui/internal-test-utils/setupJSDOM',
'./packages/mui-base/test/setup.ts',
],
'watch-ignore': [
// default
'.git',
Expand Down
80 changes: 80 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,85 @@
# Versions

## v1.0.0-alpha.2

_Aug 19, 2024_

A big thanks to the 10 contributors who made this release possible. Here are some highlights ✨:

⭐ We added many new components: AlertDialog, Dialog, Field, Menu, Popover, PreviewCard, Progress, Slider, and Tooltip.

### `@base_ui/[email protected]`

- [Checkbox] Fix checked change when clicking button with wrapping label (#467) @atomiks
- [Dialog] Create new component and hook (#372) @michaldudak
- [Field] Create new Field components (#477) @atomiks
- [Menu] Overhaul the component API (#468) @michaldudak
- [NumberField] Fix tests on non-English locale machines (#524) @michaldudak
- [NumberField] Rename `onChange` prop to `onValueChange` (#464) @atomiks
- [Popover] Component and Hook (#381) @atomiks
- [Popover] Fix `keepMounted` focus management (#489) @atomiks
- [Popover] Wait for focus to settle in tests (#491) @michaldudak
- [PreviewCard] Create new component (#469) @atomiks
- [PreviewCard] Fix Firefox browser hang (#490) @atomiks
- [Progress] New `Progress` components (#470) @mj12albert
- [Slider] improve `disabled` prop description (#527) @sai6855
- [Slider] New Slider components and hook (#373) @mj12albert
- [Switch/Checkbox] Rename `onChange` prop to `onCheckedChange` (#465) @atomiks
- [Tabs] Fix indicator tests (#379) @michaldudak
- [Tooltip] Component and Hook (#264) @atomiks
- [Tooltip] Fix animations (#426) @atomiks
- [useCompoundParent] Display `displayName` only in dev (#525) @sai6855

### Docs

- [docs] Add badges like in Material UI @oliviertassinari
- [docs] Add the logo to the README (#448) @danilo-leal
- [docs] Convert alpha component docs to new docs template (#392) @colmtuite
- [docs] Correct Bundlephobia links (#419) @michaldudak
- [docs] Fix page description line break @oliviertassinari
- [docs] Fix the X link (#450) @michaldudak
- [docs] Fix Vale errors (#492) @oliviertassinari
- [docs] Prepare security table for once it has its first release (#536) @oliviertassinari
- [docs] Update twitter.com to x.com @oliviertassinari
- [docs][Tooltip] Use the correct version of ComponentLinkHeader (#425) @michaldudak

### Core

- [code-infra] Fix pnpm version in package.json engines (#409) @Janpot
- [code-infra] Propagate API docs builder package interface changes (#478) @LukasTy
- [code-infra] Remove raw-loader (#404) @michaldudak
- [code-infra] Use shared .stylelintrc.js config (#415) @oliviertassinari
- [core] Add `trackAnchor` prop for anchor positioning (#519) @atomiks
- [core] Add `useAnchorPositioning` Hook (#461) @atomiks
- [core] Add `useTransitionStatus` and `useExecuteIfNotAnimated` Hooks (#396) @atomiks
- [core] Add codeowners file (#447) @michaldudak
- [core] Allow Renovate to update pnpm (#446) @michaldudak
- [core] Encapsulate the common rendering logic in `useComponentRenderer` (#408) @michaldudak
- [core] Fix event naming convention @oliviertassinari
- [core] Improve performance of `mergeReactProps` (#456) @marcpachecog
- [core] Improve Tooltip and Popover consistency (#463) @atomiks
- [core] Link GH issue for import/prefer-default-export @oliviertassinari
- [core] Make pnpm version permissive (#529) @atomiks
- [core] Move hooks under component directories (#405) @michaldudak
- [core] Move legacy components to a subdirectory (#410) @michaldudak
- [core] Normalize rest / other to match the most common used @oliviertassinari
- [core] Refactor animation hooks (#417) @atomiks
- [core] Remove sources of old components we don't intend to support (#474) @michaldudak
- [core] Simpler pnpm dedupe error message to act on @oliviertassinari
- [core] Upgrade to core-js v3 (#418) @atomiks
- [core] Verify types in test code (#457) @michaldudak
- [dependencies] Do not try to update eslint (#515) @michaldudak
- [docs-infra] Fix a stylelint issue (#421) @oliviertassinari
- [docs-infra] Integrate the latest @mui/docs (#378) @michaldudak
- [test] Clean up and unify test code (#532) @michaldudak
- [test] Update test-utils and remove enzyme (#473) @michaldudak
- [test] Use internal-test-utils from npm (#424) @michaldudak
- [typescript] Add `type` to export statements (#544) @michaldudak
- [website] Fix /base-ui/ code duplication (#416) @oliviertassinari- [infra] Add support donation button @oliviertassinari
- [website] Redirect to an existing page on dev (#445) @michaldudak

All contributors of this release in alphabetical order: @atomiks, @colmtuite, @danilo-leal, @Janpot, @LukasTy, @marcpachecog, @michaldudak, @mj12albert, @oliviertassinari, @sai6855

## v1.0.0-alpha.1

<!-- generated comparing v1.0.0-alpha.0..master -->
Expand Down
Loading

0 comments on commit 3f2de1f

Please sign in to comment.