Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[App Search] Added the log retention confirmation modal to the Settings page #83009

Merged
merged 8 commits into from
Nov 11, 2020

Conversation

JasonStoltz
Copy link
Member

@JasonStoltz JasonStoltz commented Nov 9, 2020

Summary

This PR adds the confirmation modal for log retention settings to the App Search Settings page.

screencapture-localhost-5601-app-enterprise-search-app-search-settings-account-2020-11-09-14_54_03

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@JasonStoltz JasonStoltz added release_note:skip Skip the PR/issue when compiling release notes v7.11.0 labels Nov 9, 2020
@JasonStoltz
Copy link
Member Author

JasonStoltz commented Nov 10, 2020

This PR is in draft until #82982 is merged. But it's slow going getting that merged, I had to update it to resolve conflicts so now I have to wait for CI again.

You can get a head start on reviewing this PR if you'd like. Just focus on this commit: 680b28e

UPDATE: This is ready for review

@JasonStoltz JasonStoltz marked this pull request as ready for review November 10, 2020 15:35
@JasonStoltz JasonStoltz requested a review from a team November 10, 2020 15:35
Copy link
Member

@cee-chen cee-chen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome stuff! QA and mobile/cross-browser testing looks great. Some minor test and i18n/a11y comments but overall looks great.

Comment on lines 79 to 80
)}
{openedModal === ELogRetentionOptions.API && (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just me thinking out loud: I wonder what the impetus was for creating multiple modals instead of a single modal where the content gets changed depending on the option selected - I personally would probably have opted for the latter 🤔

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that may have been cleaner.

Comment on lines 61 to 63
// Remove the jest mock on createPortal
// @ts-ignore
ReactDOM.createPortal.mockClear();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this ts-ignore and comment here? Do we need it, or can we do

Suggested change
// Remove the jest mock on createPortal
// @ts-ignore
ReactDOM.createPortal.mockClear();
(ReactDOM.createPortal as jest.Mock).mockClear();

or just jest.clearAllMocks 🤷
edit: which we're already doing in beforeEach - can we lose this block entirely?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deleted per previous comment.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +80 to +81
{i18n.translate('xpack.enterpriseSearch.appSearch.settings.logRetention.modal.cancel', {
defaultMessage: 'Cancel',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[not a change request, just me thinking out loud]
I wonder if we should have a library of common UI strings like 'Cancel', 'Save', 'Edit', 'Delete' etc., to lower the number of i18n strings we have and the number of translations the team has to do

Happy to do this is a tech debt refactor in a separate PR later if you think it's a good idea 🤷

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that's a good point!

>
<EuiFieldText
data-test-subj="GenericConfirmationModalInput"
name="engineName"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this name doesn't seem right? do we even need a name prop

Suggested change
name="engineName"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JasonStoltz
Copy link
Member Author

@constancecchen Ready for a second look

Copy link
Member

@cee-chen cee-chen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great - thank you so much for the changes! Really excited by how much we're improving our codebase for international users and users with disabilities.

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
enterpriseSearch 461 463 +2

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
enterpriseSearch 682.7KB 691.6KB +8.9KB

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@JasonStoltz JasonStoltz merged commit 83b52bf into elastic:master Nov 11, 2020
@JasonStoltz JasonStoltz deleted the log-retention-ui-2 branch November 11, 2020 16:46
JasonStoltz added a commit to JasonStoltz/kibana that referenced this pull request Nov 11, 2020
gmmorris added a commit to gmmorris/kibana that referenced this pull request Nov 12, 2020
…ts-public

* upstream/master: (57 commits)
  Remove unused asciidoc file (elastic#83228)
  [Lens] Remove background from lens embeddable (elastic#83061)
  [Discover] Unskip flaky tests based on discover fixture index pattern (elastic#82991)
  Removing unnecessary trailing slash in CODEOWNERS
  Trying to fix CODEOWNERS again, where was a non-existent team prior (elastic#83236)
  Trying to fix CODEOWERS, missing a starting slash (elastic#83233)
  skip flaky suite (elastic#83231)
  Add enzyme rerender test helper (elastic#83208)
  Move Elasticsearch type definitions out of APM (elastic#83081)
  [ts/checkTsProjects] produce a more useful error message (elastic#83209)
  [kbnClient] retry updating config if necessary (elastic#83205)
  I accidentally removed this line in a recent PR (elastic#83201)
  Don't make the caller do work the function can do (elastic#83180)
  [App Search] Update EngineRouter & EngineNav to use EngineLogic (elastic#83138)
  [Workplace Search] Add routes for Sources (elastic#83125)
  Update logstash pipeline management to use system index APIs (elastic#80405)
  [ML] Replace EuiBasicTable with EuiInMemoryTable (elastic#83057)
  [Metrics UI] Add basic interaction and shell for node details overlay (elastic#82013)
  [App Search] Added the log retention confirmation modal to the Settings page (elastic#83009)
  [docs] Fix create map title in import geospatial page (elastic#83172)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes v7.11.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants