Skip to content

Commit

Permalink
Clean up changes
Browse files Browse the repository at this point in the history
  • Loading branch information
lahmatiy committed Dec 10, 2024
1 parent d3cd41c commit 70b997c
Showing 1 changed file with 1 addition and 22 deletions.
23 changes: 1 addition & 22 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,11 @@
- Added `computeClassName()` and `applyComputedClassName()` methods to view render context API
- Added root CSS properties: `--discovery-monospace-font-size` and `--discovery-monospace-line-height`
- Changes in page hash state API:
- Changed processing of page params to process `!anchor` as `pageAnchor`, previously `!anchor` parameter of page hash was included into `pageParams`, now it's a separate value with a dedicated property and event on `ViewModel` instance.
- Changed `pageStateChange` event to not fire when `!anchor` in page hash changed; it also means that `ViewModel` doesn't initiate a render on `!anchor` hash param changes
- Changed `pageParams` to not include `!anchor`
- Added `ViewModel#pageAnchor` to store page's anchor value (`!anchor` hash parameter) if any, or `null`
- Added `pageAnchorChange` event for `ViewModel` which fires when `pageAnchor` changes
- Changed `Model#encodePageHash()` to take `pageAnchor` as 4th parameter
- Changed `Model#decodePageHash()` to return `pageAnchor`
- Changed `ViewModel#setPage()`, `ViewModel#setPageRef()` and `ViewModel#setParams()` to reset anchor
- Added `ViewModel#setPageHashState(pageState, replace)` method
- Added `ViewModel#setPageHashStateWithAnchor(pageStateWithAnchor, replace)` method
- Added `ViewModel#overridePageHashState(pageState, replace)` method
- Added `ViewModel#overridePageHashStateWithAnchor(pageStateWithAnchor, replace)` method
- Added `ViewModel#getPageHashState()`
- Added `ViewModel#getPageHashStateWithAnchor()` method
- Extended `ViewModel#setPageHash()` method, to transform passed hash starting with `#!` (i.e. `#!{value}`) to `#{current-hash}&!anchor={value}`; note that `#!` hash will just reset anchor (set it to `null`) but will keep the rest values in a hash (the same behaviour for `#&!anchor` and `#&!anchor=`). The changes should not clash with existed logic since valid encoded anchor is `#&!anchor=...`, i.e. preceding with `&`
- Changed `pageLink` jora query helper to accept `pageAnchor` parameter
- Embed API:
- Added `EmbedApp#setPageHashState()` and `EmbedApp#setPageHashStateWithAnchor()` methods
- Added `EmbedApp#setPageAnchor()` method
- Added `EmbedApp#pageAnchor` observer
- Updated the page hash state API:
- Changed processing of page parameters so `!anchor` is now treated as `pageAnchor`. Previously, `!anchor` was included in `pageParams`, now it’s a separate value with its own property and event on the `ViewModel` instance
- Updated `pageStateChange` event to no longer fire when `!anchor` in the page hash changes, meaning `ViewModel` will not initiate a render on `!anchor` hash parameter changes
- Removed `!anchor` from `ViewModel#pageParams`
- Added `ViewModel#pageAnchor` to store the page’s anchor value (`!anchor`) or `null`
- Added a `pageAnchorChange` event for `ViewModel`, which fires when `pageAnchor` changes
- Added `pageAnchorChange` event for `ViewModel`, which fires when `pageAnchor` changes
- Changed `Model#encodePageHash()` to accept `pageAnchor` as the 4th parameter
- Changed `Model#decodePageHash()` to return `pageAnchor`
- Changed `ViewModel#setPage()` and `ViewModel#setParams()` to reset the anchor (`pageAnchor`) since `pageParams` can hold `!anchor` anymore
Expand Down

0 comments on commit 70b997c

Please sign in to comment.