Skip to content

Commit

Permalink
Addresses comments
Browse files Browse the repository at this point in the history
Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com>
  • Loading branch information
ashwin-pc committed Oct 2, 2023
1 parent 6b0a6ad commit b369b14
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)

### 🛡 Security

- [CVE-2022-25869] Removes angularJS 1.8 ([#5068](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5068))
- [CVE-2022-25869] Remove AngularJS 1.8 ([#5068](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5068))
- [CVE-2022-37599] Bump loader-utils from `2.0.3` to `2.0.4` ([#3031](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3031)). Backwards-compatible fixes included in v2.6.0 and v1.3.7 releases.
- [CVE-2022-37603] Bump loader-utils from `2.0.3` to `2.0.4` ([#3031](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3031)). Backwards-compatible fixes included in v2.6.0 and v1.3.7 releases.
- [WS-2021-0638] Bump mocha from `7.2.0` to `10.1.0` ([#2711](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2711))
Expand Down Expand Up @@ -39,7 +39,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Adds Data explorer framework and implements Discover using it ([#4806](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4806))
- [Theme] Use themes' definitions to render the initial view ([#4936](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4936/))
- [Theme] Make `next` theme the default ([#4854](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4854/))
- [Discover] Updated embeddable for saved searches ([#5081](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5081/))
- [Discover] Update embeddable for saved searches ([#5081](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5081/))

### 🐛 Bug Fixes

Expand All @@ -56,7 +56,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- [BUG] Fix buildPointSeriesData unit test fails due to local timezone ([#4992](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4992))
- [BUG][Data Explorer][Discover] Fix total hits issue for no time based data ([#5087](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5087))
- [BUG][Discover] Fix misc navigation issues ([#5168](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5168))
- [BUG][Discover] Fixes mobile view ([#5168](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5168))
- [BUG][Discover] Fix mobile view ([#5168](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5168))

### 🚞 Infrastructure

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,17 +80,14 @@ export const getPreloadedStore = async (services: DataExplorerServices) => {
// the store subscriber will automatically detect changes and call handleChange function
const unsubscribe = store.subscribe(handleChange);

// This is necessary because browser navigation updates URL state that isnt reflected in the redux state
services.scopedHistory.listen(async (location, action) => {
const urlState = await loadReduxState(services);
const currentState = store.getState();

Check warning on line 86 in src/plugins/data_explorer/public/utils/state_management/store.ts

View check run for this annotation

Codecov / codecov/patch

src/plugins/data_explorer/public/utils/state_management/store.ts#L84-L86

Added lines #L84 - L86 were not covered by tests

if (isEqual(urlState, currentState)) {
return;
}

// If the url state is different from the current state, then we need to update the store
// the state should have a view property if it was loaded from the url
if (action === 'POP' && urlState.metadata?.view) {
if (action === 'POP' && urlState.metadata?.view && !isEqual(urlState, currentState)) {
store.dispatch(hydrate(urlState as RootState));

Check warning on line 91 in src/plugins/data_explorer/public/utils/state_management/store.ts

View check run for this annotation

Codecov / codecov/patch

src/plugins/data_explorer/public/utils/state_management/store.ts#L91

Added line #L91 was not covered by tests
}
});
Expand Down

0 comments on commit b369b14

Please sign in to comment.