Skip to content

Commit 4e15aea

Browse files
committed
Update RELEASE_NOTES.md
1 parent c681406 commit 4e15aea

File tree

1 file changed

+43
-9
lines changed

1 file changed

+43
-9
lines changed

RELEASE_NOTES.md

Lines changed: 43 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,14 @@ This serves two purposes:
1111

1212
### Added
1313
- Added a new `\Hyde\Framework\Actions\PreBuildTasks\TransferMediaAssets` build task handle media assets transfers for site builds.
14-
- Added a new `NavigationItem::getLink()` method contain the previous `NavigationItem::getDestination()` logic, to return the link URL.
1514

1615
### Changed
16+
- **Breaking:** The internals of the navigation system has been rewritten into a new Navigation API. This change is breaking for custom navigation implementations. For more information, see below.
17+
- Minor: Navigation menu items are now no longer filtered by duplicates (meaning two items with the same label can now exist in the same menu) in https://github.com/hydephp/develop/pull/1573
18+
- Minor: Due to changes in the navigation system, it is possible that existing configuration files will need to be adjusted in order for menus to look the same (in terms of ordering etc.)
19+
- Minor: The documentation article component now supports disabling the semantic rendering using a falsy value in https://github.com/hydephp/develop/pull/1566
1720
- Changed how the documentation search is generated, to be an `InMemoryPage` instead of a post-build task.
1821
- Media asset files are now copied using the new build task instead of the deprecated `BuildService::transferMediaAssets()` method.
19-
- Minor: The documentation article component now supports disabling the semantic rendering using a falsy value in https://github.com/hydephp/develop/pull/1566
20-
- Navigation menu items are now no longer filtered by duplicates (meaning two items with the same label can now exist in the same menu) in https://github.com/hydephp/develop/pull/1573
21-
- Breaking: The `NavigationItem` class now always stores the destination as a `Route` instance.
22-
- Breaking: The `NavigationItem::getDestination()` method now returns its `Route` instance.
2322

2423
### Deprecated
2524
- for soon-to-be removed features.
@@ -45,6 +44,32 @@ Please see the "Breaking changes & upgrade guide" section below for more informa
4544

4645
Please read through this section to ensure your site upgrades smoothly.
4746

47+
## High impact
48+
49+
### Navigation system rewrite
50+
51+
The navigation system has been rewritten into a new Navigation API. This change is breaking for custom navigation implementations, see more down below.
52+
53+
For most users, the only impact will be that configuration files need to be updated to use the new configuration format. Due to the internal changes,
54+
it's also possible that menu items will be in a slightly different order than before, depending on your setup. Please verify that your site's menus
55+
look as expected after upgrading, and adjust the configuration files if necessary, before deploying to production.
56+
57+
### Navigation and sidebar configuration changes
58+
59+
The navigation and sidebar configuration files have been updated to use the new Navigation API.
60+
This means that you will need to update your configuration files to use the new format.
61+
62+
The easiest way to upgrade is to publish updated configuration files (`hyde.php` and `docs.php`) and copy over your customizations.
63+
64+
The following configuration entries have been updated:
65+
66+
- Changed configuration option `docs.sidebar_order` to `docs.sidebar.order` in https://github.com/hydephp/develop/pull/1583
67+
- Upgrade path: Move the `sidebar_order` option's array in the `config/docs.php` file into the `sidebar` array in the same file.
68+
69+
- Changed configuration option `docs.table_of_contents` to `docs.sidebar.table_of_contents` in https://github.com/hydephp/develop/pull/1584
70+
- Upgrade path: Move the `table_of_contents` option's array in the `config/docs.php` file into the `sidebar` array in the same file.
71+
72+
4873
## General impact
4974

5075
### Documentation search page changes
@@ -60,13 +85,22 @@ For more information, see https://github.com/hydephp/develop/pull/1498.
6085

6186
## Low impact
6287

63-
### Navigation item changes
88+
### Navigation internal changes
89+
90+
The navigation system has been rewritten into a new Navigation API. This change is breaking for custom navigation implementations.
91+
92+
If you have previously in your custom code done any of the following, or similar, you will need to adapt your code to use the new Navigation API:
93+
- Created custom navigation menus or Blade components
94+
- Extended or called the navigation related classes directly
95+
- Customized the navigation system in any way beyond the standard configuration
96+
6497

65-
The `NavigationItem::getDestination()` method now returns its `Route` instance. This allows for deferring the route evaluation.
98+
#### Upgrade guide
6699

67-
If you have previously used this method directly and expected a string to be returned, you may need to adapt your code to handle the new return type.
100+
Due to the scope of the rewrite, the easiest and fastest way to upgrade your code is to recreate it using the new Navigation API.
68101

69-
If you want to retain the previous state where a string is always returned, you can use the new `NavigationItem::getLink()` method instead, which will resolve the route immediately.
102+
- For a full comparison of the changes, you may see the PR that introduced the new API: https://github.com/hydephp/develop/pull/1568/files
103+
- For information on how to use the new Navigation API, see the documentation: https://hydephp.com/docs/2.x/navigation-api
70104

71105
### HTML ID changes
72106

0 commit comments

Comments
 (0)