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

v7.0.0-alpha.5 #11414

Merged
merged 5 commits into from
Dec 14, 2023
Merged

v7.0.0-alpha.5 #11414

merged 5 commits into from
Dec 14, 2023

Conversation

MBilalShafi
Copy link
Member

@MBilalShafi MBilalShafi commented Dec 14, 2023

  • Include v6 release changelog

Release the packages

  • Checkout the last version of the working branch
  • Make sure you have the latest dependencies installed: yarn.
  • Build the packages: yarn release:build.
  • Release the versions on npm: yarn release:publish (you need your 2FA device).
  • Push the newly created tag: yarn release:tag.

Publish the documentation

The documentation must be updated on the docs-vX branch (docs-v4 for v4.X releases, docs-v5 for v5.X releases, ...)

  • Push the working branch on the documentation release branch to deploy the documentation with the latest changes.
git push upstream next:docs-next -f

You can follow the deployment process on the Netlify Dashboard
Once deployed, it will be accessible at https://material-ui-x.netlify.app/ for the docs-next deployment.

Publish GitHub release

@mui-bot
Copy link

mui-bot commented Dec 14, 2023

Deploy preview: https://deploy-preview-11414--material-ui-x.netlify.app/

Generated by 🚫 dangerJS against 5e91bfe

CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
Co-authored-by: Lukas <llukas.tyla@gmail.com>
Signed-off-by: Bilal Shafi <bilalshafidev@gmail.com>
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
MBilalShafi and others added 2 commits December 14, 2023 19:35
Co-authored-by: Lukas <llukas.tyla@gmail.com>
Signed-off-by: Bilal Shafi <bilalshafidev@gmail.com>
@MBilalShafi MBilalShafi merged commit c8e4c7d into mui:next Dec 14, 2023
17 checks passed
@MBilalShafi MBilalShafi deleted the v7.0.0-alpha.5 branch December 14, 2023 15:01
- [pickers] Fix field types to avoid error on latest `@types/react` version (#11397) @LukasTy
- [pickers] Remove all relative imports to the internals index file (#11375) @flaviendelangle
- [pickers] Rename slots interfaces (#11339) @alexfauquette
- [pickers] Simplify the API of the field hooks (#11371) @flaviendelangle
Copy link
Member

Choose a reason for hiding this comment

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

We missed the BCs for this one

Copy link
Member Author

Choose a reason for hiding this comment

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

Oops too late, packages published.
Please share them and I'll open another PR and update the release notes too

Copy link
Member

Choose a reason for hiding this comment

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

It's never too late to update the changelog or release notes. 👌 😉

Copy link
Member

Choose a reason for hiding this comment

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

  • Move inputRef inside the props passed to the field hooks

    The field hooks now only receive the props instead of an object containing both the props and the inputRef.

    - const { inputRef, ...otherProps } = props
    - const fieldResponse = useDateField({ props: otherProps, inputRef });
    + const fieldResponse = useDateField(props);

    If you are using a multi input range field hook, the same applies to startInputRef and endInputRef params

    - const { inputRef: startInputRef, ...otherStartTextFieldProps } = startTextFieldProps
    - const { inputRef: endInputRef, ...otherEndTextFieldProps } = endTextFieldProps
    
      const fieldResponse = useMultiInputDateRangeField({
        sharedProps,
    -   startTextFieldProps: otherStartTextFieldProps,
    -   endTextFieldProps: otherEndTextFieldProps,
    -   startInputRef
    -   endInputRef,
    +   startTextFieldProps, 
    +   endTextFieldProps
      });
  • Rename the ref returned by the field hooks to inputRef

    When used with the v6 TextField approach (where the input is an <input /> HTML element), the field hooks return a ref that needs to be passed to the <input /> element.
    This ref was previously named ref and has been renamed inputRef for extra clarity.

      const fieldResponse = useDateField(props);
    
    - return <input ref={fieldResponse.ref} /> 
    + return <input ref={fieldResponse.inputRef} />

    If you are using a multi input range field hook, the same applies to the ref in the startDate and endDate objects

      const fieldResponse = useDateField(props);
    
      return (
        <div>
    -     <input ref={fieldResponse.startDate.ref} />
    +     <input ref={fieldResponse.startDate.inputRef} />
          <span>–</span>
    -     <input ref={fieldResponse.endDate.ref} />
    +     <input ref={fieldResponse.endDate.inputRef} />
        </div>
      )
  • Restructure the API of useClearableField

    The useClearableField hook API has been simplified to now take a props parameter instead of a fieldProps, InputProps, clearable, onClear, slots and slotProps parameters.

    You should now be able to directly pass the returned value from your field hook (e.g: useDateField) to useClearableField

      const fieldResponse = useDateField(props);
    
    - const { InputProps, onClear, clearable, slots, slotProps, ...otherFieldProps } = fieldResponse
    - const { InputProps: ProcessedInputProps, fieldProps: processedFieldProps } = useClearableField({
    -   fieldProps: otherFieldProps,
    -   InputProps,
    -   clearable,
    -   onClear,
    -   slots,
    -   slotProps,
    - }); 
    -
    -  return <MyCustomTextField {...processedFieldProps} InputProps={ProcessedInputProps} />
    
    + const processedFieldProps = useClearableField(fieldResponse);
    +
    + return <MyCustomTextField {...processedFieldProps} />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release We are shipping :D
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants