-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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] Engine overview layout stub #83504
Conversation
6de0b10
to
dc9afe3
Compare
export const TOTAL_CLICKS = i18n.translate( | ||
'xpack.enterpriseSearch.appSearch.engine.analytics.totalClicks', | ||
{ defaultMessage: 'Total Clicks' } | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These constants are also used in the Analytics view so I figured I'd do myself a favor and start a constants file early.
export const RECENT_API_EVENTS = i18n.translate( | ||
'xpack.enterpriseSearch.appSearch.engine.apiLogs.recent', | ||
{ defaultMessage: 'Recent API Events' } | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above, this title is also used in the API Logs view
export { UnavailablePrompt } from './unavailable_prompt'; | ||
export { TotalStats } from './total_stats'; | ||
export { TotalCharts } from './total_charts'; | ||
export { RecentLogs } from './recent_logs'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went back and forth a little on whether I should split out the metrics view into sub-components, and I'm very happy I did in the end. The code feels much easier to test and reason about in smaller bite-sized files.
I left the empty engine view as one piece/component but definitely open to splitting that up as well if folks think that will help readability.
TODO: Analytics chart | ||
{/* <EngineAnalytics | ||
data={[queriesPerDay]} | ||
startDate={new Date(startDate)} | ||
endDate={new Date(endDate)} | ||
/> */} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be clear I'm not 100% on if this will translate perfectly to EuiChart as I haven't spiked that out much, I'm just leaving this in as reference from our old code
|
||
export const UnavailablePrompt: React.FC = () => ( | ||
<EuiEmptyPrompt | ||
iconType="clock" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've never actually seen this prompt before, so this was my best guesstimate on migrating a STUI icon to EUI
...erprise_search/public/applications/app_search/components/engine_overview/engine_overview.tsx
Show resolved
Hide resolved
...erprise_search/public/applications/app_search/components/engine_overview/engine_overview.tsx
Show resolved
Hide resolved
...rch/public/applications/app_search/components/engine_overview/engine_overview_empty.test.tsx
Outdated
Show resolved
Hide resolved
2644fa9
to
fdf1a4d
Compare
- Minus document creation button & API code example
fdf1a4d
to
2be4c35
Compare
- They're repeated/reused by the DocumentCreationPopover component
</EuiPageContentHeader> | ||
<EuiPageContentBody> | ||
<EuiText color="subdued"> | ||
<p>{DOCUMENT_CREATION_DESCRIPTION}</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had some comments and questions, but none of it's blocking. Feel free to merge as is, or address as you see fit.
.../enterprise_search/public/applications/app_search/components/document_creation/constants.tsx
Show resolved
Hide resolved
..._search/public/applications/app_search/components/engine_overview/components/recent_logs.tsx
Outdated
Show resolved
Hide resolved
const engineRoute = getEngineRoute(engineName); | ||
|
||
return ( | ||
<EuiPageContent> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Semantically, are pages meant to have multiple EuiPageContent in EUI? Or is there some other tag available for page sections?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Semantically I don't see a reason why not as they're not using <main>
components under the hood (which is what we're using for EuiPageBody
) - they're just plain <div>
s which carry no extra meaning to web crawlers or screen readers.
..._search/public/applications/app_search/components/engine_overview/components/recent_logs.tsx
Outdated
Show resolved
Hide resolved
title={ | ||
<h2> | ||
{i18n.translate('xpack.enterpriseSearch.appSearch.engine.overview.unavailableTitle', { | ||
defaultMessage: 'Dashboard metrics are currently unavailable', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
defaultMessage: 'Dashboard metrics are currently unavailable', | |
defaultMessage: 'Dashboard metrics are currently unavailable.', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 For a lot of these casing comments, I was copying these over from ent-search as-is, but I think it makes a lot of sense to update them as we migrate. Will do so going forward!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went back and looked at some of EuiEmptyPrompt examples and I think the headings are actually not supposed to have punctuation: https://elastic.github.io/eui/#/display/empty-prompt and
So going to leave this one as-is 🤷
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense 👍
...erprise_search/public/applications/app_search/components/engine_overview/engine_overview.tsx
Show resolved
Hide resolved
...erprise_search/public/applications/app_search/components/engine_overview/engine_overview.tsx
Show resolved
Hide resolved
<EuiTitle size="l"> | ||
<h1> | ||
{i18n.translate('xpack.enterpriseSearch.appSearch.engine.overview.empty.heading', { | ||
defaultMessage: 'Engine Setup', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per the Kibana writing guidelines, I think stuff like this should not be Title Cased. I'm actually unsure of this one.
defaultMessage: 'Engine Setup', | |
defaultMessage: 'Engine setup', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chriscressman Do you mind weighing in on this here? Should we be updating various headings and buttons to use sentence case over title case as we migrate to Kibana?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we should consistently use sentence case in all our UIs. This is a company-wide style rule. The Kibana migration is a great opportunity to align. Thanks for checking!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also @JasonStoltz - should Engine overview
also be sentence cased vs title cased in that case? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think ideally we would change all heading and button text within these screens to use sentence case.
@gchaps is the expert on Kibana (and Elastic) UI text. Can you confirm Gail?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Chris! I think my confusion is what's considered a "Feature Title" vs not. "Overview" is technically the title of the page and is capitalized in the navigation, does that make it a feature that should remain capitalized?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for opening this can of worms 😬
...e_search/public/applications/app_search/components/engine_overview/engine_overview_empty.tsx
Outdated
Show resolved
Hide resolved
...rch/public/applications/app_search/components/engine_overview/engine_overview_empty.test.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Set up the "empty" Engine
I'd change this to:
Setting up the "empty" engine
since the text in that section is explaining the process rather than providing a step-by-step procedure. The second form is also consistent with the next heading on the page.
Other than the suggestion above, and the suggestion to use title casing, this looks good to me.
Re: copy - I'll definitely make an effort to grab any low-hanging fruit going forward, but App Search definitely has a lot of scenarios where it's unclear what's a Feature Title/proper noun vs over-enthusiastic title casing. We also have a lot of code to shift and a tight release deadline without much wiggle-room, and we can't necessarily afford to wait for extra reviews to merge PRs. My proposal going forward is:
or
Let me know your thoughts and what you have time for, Chris and Gail! ❤️ |
7c6c8c8
to
9bc3780
Compare
I think this might be better for everyone. Personally, I prefer to work in an async flow. I tend to structure my day, so I ignore notifications during large chunks. I don't want copy changes to block progress. But for reference, Elastic feature names should not be capitalized:
-- from the Elastic naming guide So feature names like engine and analytics should be lowercase, except when the first word in a sentence. I corrected my earlier comment, where I wrote Engine instead of engine. |
dbf42c0
to
51f20a8
Compare
That is super helpful, thank you Chris!! I think I'm starting to get it now 🎉 I've updated copy in this PR, will be doing another quick pass of the rest of our current app, and have created a follow-up icebox ticket to remind myself to come back and you amazing copy folks in 7.13 / April 2021 when the full app is ready. Until then!! 🙇♀️ |
@chriscressman, @constancecchen Agree that it will be good to do a copy review in a single swoop. That way, we can make sure that the text flows from one page to the next. |
51f20a8
to
cc01d6b
Compare
💚 Build SucceededMetrics [docs]Module Count
Async chunks
History
To update your PR or re-run it, just comment with: |
* Set up Overview file * Finish Overview page logic, stub out empty/metric views * Stub in basic empty engine overview - Minus document creation button & API code example * Stub out EngineOverviewMetrics and unavailable empty prompt * Stub out EngineOverMetrics components (stats, charts, logs) * [Refactor] Pull out some document creation i18n strings to constants - They're repeated/reused by the DocumentCreationPopover component * PR feedback: Drop the regex * PR feedback: RecentLogs -> RecentApiLogs * PR feedback: Copy * PR feedback: Copy, sentence-casing
Sorry, this started to fail as soon as it was merged into master. I've reverted it for now to leave master broken for as little time as possible. Please resubmit with master merged, thanks! I also suggest closing the backport and backporting the resubmit-PR instead. |
* master: (60 commits) Forward any registry cache-control header for files (elastic#83680) Revert "[Alerting] Add `alert.updatedAt` field to represent date of last user edit (elastic#83578)" [Security Solution][Detections] Fix adding an action to detection rules (elastic#83722) Make expectSnapshot available in all functional test runs (elastic#82932) Skip failing cypress test Increase bulk request timeout during esArchiver load (elastic#83657) [data.search] Server-side background session service (elastic#81099) [maps] convert VectorStyleEditor to TS (elastic#83582) Revert "[App Search] Engine overview layout stub (elastic#83504)" Adding documentation for global action configuration options (elastic#83557) [Metrics UI] Optimizations for Snapshot and Inventory Metadata (elastic#83596) chore(NA): update lmdb store to v0.8.15 (elastic#83726) [App Search] Engine overview layout stub (elastic#83504) [Workplace Search] Update SourceIcon to match latest changes in ent-search (elastic#83714) [Enterprise Search] Rename React Router helpers (elastic#83718) [Maps] Add 'crossed' & 'exited' events to tracking alert (elastic#82463) Updating code-owners to use new core/app-services team names (elastic#83731) Add Managed label to data streams and a view switch for the table (elastic#83049) [Maps] Add query bar inputs to geo threshold alerts tracked points & boundaries (elastic#80871) fix(NA): search examples kibana version declaration (elastic#83182) ...
* master: (60 commits) Forward any registry cache-control header for files (elastic#83680) Revert "[Alerting] Add `alert.updatedAt` field to represent date of last user edit (elastic#83578)" [Security Solution][Detections] Fix adding an action to detection rules (elastic#83722) Make expectSnapshot available in all functional test runs (elastic#82932) Skip failing cypress test Increase bulk request timeout during esArchiver load (elastic#83657) [data.search] Server-side background session service (elastic#81099) [maps] convert VectorStyleEditor to TS (elastic#83582) Revert "[App Search] Engine overview layout stub (elastic#83504)" Adding documentation for global action configuration options (elastic#83557) [Metrics UI] Optimizations for Snapshot and Inventory Metadata (elastic#83596) chore(NA): update lmdb store to v0.8.15 (elastic#83726) [App Search] Engine overview layout stub (elastic#83504) [Workplace Search] Update SourceIcon to match latest changes in ent-search (elastic#83714) [Enterprise Search] Rename React Router helpers (elastic#83718) [Maps] Add 'crossed' & 'exited' events to tracking alert (elastic#82463) Updating code-owners to use new core/app-services team names (elastic#83731) Add Managed label to data streams and a view switch for the table (elastic#83049) [Maps] Add query bar inputs to geo threshold alerts tracked points & boundaries (elastic#80871) fix(NA): search examples kibana version declaration (elastic#83182) ...
…ode-details * 'master' of github.com:elastic/kibana: fixed pagination in connectors list (elastic#83638) Forward any registry cache-control header for files (elastic#83680) Revert "[Alerting] Add `alert.updatedAt` field to represent date of last user edit (elastic#83578)" [Security Solution][Detections] Fix adding an action to detection rules (elastic#83722) Make expectSnapshot available in all functional test runs (elastic#82932) Skip failing cypress test Increase bulk request timeout during esArchiver load (elastic#83657) [data.search] Server-side background session service (elastic#81099) [maps] convert VectorStyleEditor to TS (elastic#83582) Revert "[App Search] Engine overview layout stub (elastic#83504)" Adding documentation for global action configuration options (elastic#83557) [Metrics UI] Optimizations for Snapshot and Inventory Metadata (elastic#83596) chore(NA): update lmdb store to v0.8.15 (elastic#83726) [App Search] Engine overview layout stub (elastic#83504) [Workplace Search] Update SourceIcon to match latest changes in ent-search (elastic#83714) [Enterprise Search] Rename React Router helpers (elastic#83718)
* Set up Overview file * Finish Overview page logic, stub out empty/metric views * Stub in basic empty engine overview - Minus document creation button & API code example * Stub out EngineOverviewMetrics and unavailable empty prompt * Stub out EngineOverMetrics components (stats, charts, logs) * [Refactor] Pull out some document creation i18n strings to constants - They're repeated/reused by the DocumentCreationPopover component * PR feedback: Drop the regex * PR feedback: RecentLogs -> RecentApiLogs * PR feedback: Copy * PR feedback: Copy, sentence-casing
This reverts commit 71f972d.
Summary
This PR stubs out the Engine Overview layout. It is still currently missing the following components, which will be added next:
Screencaps
Populated Engine Metrics
Empty Engine
Engine data unavailable/still indexing
(not sure I've ever seen this personally)
Checklist