[7.x] [Workplace Search] Wire up write view for Blocked windows (#114696)#114743
Merged
kibanamachine merged 1 commit intoelastic:7.xfrom Oct 13, 2021
Merged
Conversation
…4696) * Fix unsaved changes prompt showing up between tabs We already added a reducer for this but forgot to implement this. Because we have shared state between the tabs, we need to overrule the unsaved changes prompt when simply navigating between tabs. * Fix some timezone issues After wiring up the backend and converting to UTC, some changes to mocks and time formats had to be made. * Refactor to remove blockedWindows reducer This commit refactors to make use of the already-in-state schedule object. Previously, while wiring up the static views, I used a blockedWindows array directly on the state tree. This simplifies things so that equality checks can be done with one object. * Wire up ability to remove blocked window * Fix key and remove fallback It was hard to test removing an item from an array that doesn’t exist so I changed the code to expect the array to be present (! operator), since the other path is not possible. Also updated the server value from deletion to delete to match the API * Wire up blocked windows form to change values and update state * Pass formatted blocked_windows to server (test was covered in previous commit) * Update link text, hrefs, and replace temp copy One of the links was removed intentionally * Fix typo * Fix edge case where unsaved changes shown when removing last item The API omits the key when there are no items so we need to have the item removed as well in the UI state. Otherwise, removing the last item will cause the UI to say there are unsaved changes when there are not. I tried setting it as: schedule.blockedWindows = undefined but the selector did not see those as equal but deleting the key does. * More typo fixes Syncronization -> Synchronization (+h) * Fix link address * Refactor for simplicity Was unable to figure out the TypeScript but did some more digging
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backports the following commits to 7.x: