Skip to content

Commit

Permalink
Merge branch '6.0' into 6
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Jan 28, 2025
2 parents 36be8c0 + 1c7770d commit 226bbdd
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
19 changes: 19 additions & 0 deletions en/08_Changelogs/6.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,13 @@ class MyCustomPage extends Page
}
```

> [!WARNING]
> You might currently have form fields that are only added if some condition is true, for example if the user has certain permissions. If you change nothing, those fields will likely display for all users editing the record.
> You can make the fields only appear conditionally by doing one of the following:
>
> - Reverse the condition - if you are currently adding a field if some condition is true, change your logic so you instead remove the scaffolded form field if that condition is false.
> - Use the `scaffold_cms_fields_settings` configuration to ensure those form fields are not scaffolded. You can then leave your logic as is for those fields.
See the [scaffolding](/developer_guides/model/scaffolding/#scaffolding-options) section for more details about using these options.

As part of your CMS 6 upgrade, you should check all of the page types in your project and in any modules you maintain to ensure the correct form fields are available in the appropriate tabs. You should also check [`Extension`](api:SilverStripe\Core\Extension) subclasses that you know get applied to pages to ensure fields aren't being scaffolded from those that you want to keep hidden.
Expand Down Expand Up @@ -878,6 +885,18 @@ Several JavaScript dependencies have been updated, and a few have been replaced.

Notably, [`react-dnd`](https://react-dnd.github.io/react-dnd/about) has been replaced with [`dnd-kit`](https://dndkit.com/). If you were using `react-dnd` and relying on the webpack externals provided by `silverstripe/admin`, these are no longer available. We recommend refactoring your code to use `dnd-kit` so that your UX is consistent with other drag-and-drop in the CMS.

#### Bootstrap upgrade

We have upgraded from bootstrap 4 to bootstrap 5. Part of this upgrade also included upgrading reactstrap from 8 to 9 and upgrading popperjs from 1 to 2.

Refer to the following upgrade guides for details about changes you may need to make to styling and JavaScript in your CMS customisations:

- [bootstrap upgrade guide](https://getbootstrap.com/docs/5.0/migration/)
- [reactstrap upgrade guide](https://reactstrap.github.io/?path=/story/home-upgrading--page)
- [popper upgrade guide](https://popper.js.org/docs/v2/migration-guide/)

Note that while the bootstrap guide mentions removing the styling for the `.form-group`, `.form-row`, or `.form-inline` CSS classes, that styling has been included in the CMS to reduce upgrade pain.

## Bug fixes

This release includes a number of bug fixes to improve a broad range of areas. Check the change logs for full details of these fixes split by module. Thank you to the community members that helped contribute these fixes as part of the release!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ Check our [requirements](/getting_started/server_requirements) documentation.
## Tools and libraries

Styles are written in the [SCSS language](https://sass-lang.com/).
We use [Bootstrap 4](https://getbootstrap.com/) styles where possible.
We use [Bootstrap 5](https://getbootstrap.com/) styles where possible.

## Conventions

We follow the [AirBnB CSS Conventions](https://github.com/airbnb/css)
and the [BEM](https://getbem.com/) methodology (block-element-modifier).

Because we use [Bootstrap 4](https://getbootstrap.com/) which
Because we use [Bootstrap 5](https://getbootstrap.com/) which
does not follow [BEM](https://getbem.com/) naming convention there will be
a lot of places where class names voilate BEM.
However, please note that they are not a indicator of how to name classes.
Expand Down

0 comments on commit 226bbdd

Please sign in to comment.