You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: RELEASE_NOTES.md
+43-9Lines changed: 43 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,15 +11,14 @@ This serves two purposes:
11
11
12
12
### Added
13
13
- 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.
15
14
16
15
### 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
17
20
- Changed how the documentation search is generated, to be an `InMemoryPage` instead of a post-build task.
18
21
- 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.
23
22
24
23
### Deprecated
25
24
- for soon-to-be removed features.
@@ -45,6 +44,32 @@ Please see the "Breaking changes & upgrade guide" section below for more informa
45
44
46
45
Please read through this section to ensure your site upgrades smoothly.
47
46
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
+
48
73
## General impact
49
74
50
75
### Documentation search page changes
@@ -60,13 +85,22 @@ For more information, see https://github.com/hydephp/develop/pull/1498.
60
85
61
86
## Low impact
62
87
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
+
64
97
65
-
The `NavigationItem::getDestination()` method now returns its `Route` instance. This allows for deferring the route evaluation.
98
+
#### Upgrade guide
66
99
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.
68
101
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
0 commit comments