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

[Discover] Deangularize Skip to bottom button #69811

Merged
merged 10 commits into from
Jun 30, 2020

Conversation

dej611
Copy link
Contributor

@dej611 dej611 commented Jun 24, 2020

Summary

This PR contains the following features/fixes:

  • ✨ "deangularized" the Skip to Bottom button in Discover
  • 💄 Fix a styling conflict between the new EUI button and the dscSkipButton class
  • 🐛 Fix Safari issue with the button and behaviour (not clickable + wrong size + not scrolling)
  • ✅ Add basic testing

Note: To test on Safari make sure to enable Tab behaviour in Preferences > Advanced > Press Tab to highlight...

Updated screenshots

Desktop:
Screenshot 2020-06-29 at 20 18 02

Smartphone:
Screenshot 2020-06-29 at 20 18 48

Tablet:
Screenshot 2020-06-29 at 20 19 04

Checklist

Delete any items that are not applicable to this PR.

@dej611 dej611 requested a review from kertal June 24, 2020 15:25
@dej611 dej611 self-assigned this Jun 24, 2020
@dej611 dej611 added bug Fixes for quality problems that affect the customer experience Feature:Discover Discover Application Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.9.0 v8.0.0 labels Jun 24, 2020
@dej611 dej611 linked an issue Jun 24, 2020 that may be closed by this pull request
@dej611 dej611 added release_note:skip Skip the PR/issue when compiling release notes and removed bug Fixes for quality problems that affect the customer experience labels Jun 25, 2020
@dej611 dej611 marked this pull request as ready for review June 25, 2020 13:18
@dej611 dej611 requested a review from a team June 25, 2020 13:18
@dej611 dej611 requested a review from a team as a code owner June 25, 2020 13:18
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

Copy link
Member

@kertal kertal left a comment

Choose a reason for hiding this comment

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

Code LGTM, this is a great debut in the discover world 🥇 . nice 👁️ for detail. About the styling for small screen, don't think we need adaption here, button won't be necessary or will be solved differently once data grid will be the center of Discover, which will take some time. #67259.

Copy link
Contributor

@cchaos cchaos left a comment

Choose a reason for hiding this comment

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

Hey @dej611! Quick design pass for you.

Comment on lines 33 to 35
<EuiButton onClick={onClick} iconType="arrowDown" className="dscSkipButton">
<FormattedMessage id="discover.skipToBottomButtonLabel" defaultMessage="Skip to bottom" />
</EuiButton>
Copy link
Contributor

Choose a reason for hiding this comment

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

EUI actually has an EuiSkipLink precisely for this use case that would be useful here without needing the extra CSS to push it off screen as EuiSkipLink will automatically hide/show when tabbing to it. I would also make the text more descriptive than "bottom".

Suggested change
<EuiButton onClick={onClick} iconType="arrowDown" className="dscSkipButton">
<FormattedMessage id="discover.skipToBottomButtonLabel" defaultMessage="Skip to bottom" />
</EuiButton>
<EuiSkipLink size="s" onClick={onClick} className="dscSkipButton" destinationId="">
<FormattedMessage id="discover.skipToBottomButtonLabel" defaultMessage="Skip to table" />
</EuiSkipLink>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good. I looked in the button section without searching for Skip effectively in the doc. Good suggestion, I'm going to use it.

Copy link
Member

Choose a reason for hiding this comment

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

nice, didn't know this component 👍

Comment on lines 103 to 104
left: -10000px;
top: $euiSizeXS;
Copy link
Contributor

Choose a reason for hiding this comment

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

Then this would simply become.

Suggested change
left: -10000px;
top: $euiSizeXS;
right: $euiSizeXS;
top: $euiSizeXS;

And you can delete everything below this.

@dej611
Copy link
Contributor Author

dej611 commented Jun 26, 2020

Pushed suggestion fixes. The Safari fix in this PR has been removed and rather fixed up the line on the EUI EuiSkipLink itself, available in the next version of the package.

Copy link
Contributor

@cchaos cchaos left a comment

Choose a reason for hiding this comment

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

A couple last suggestions

@@ -100,16 +100,6 @@ discover-app {

.dscSkipButton {
position: absolute;
left: -10000px;
right: $euiSizeXS;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
right: $euiSizeXS;
right: $euiSizeM;

@@ -141,7 +130,7 @@ <h1 class="euiScreenReaderOnly">{{screenTitle}}</h1>
on-remove-column="removeColumn"
></doc-table>

<a tabindex="0" id="discoverBottomMarker"></a>
<a tabindex="0" id="discoverBottomMarker">&#8203;</a>
Copy link
Contributor

Choose a reason for hiding this comment

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

This symbol actually adds a line of whitespace, is this intended?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. From my tests Safari won't scroll to the marker if empty. For this reason I had to add this empty space character to the node.

<I18nProvider>
<EuiSkipLink
size="s"
iconType="arrowDown"
Copy link
Contributor

Choose a reason for hiding this comment

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

We usually reserve the arrow icons to indicate popovers or disclosure style content not directional. I think it can be omitted entirely.

Suggested change
iconType="arrowDown"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah ok. I've set it to match the previous button, but if that is not longer required I'll remove it.

@dej611 dej611 force-pushed the deangularization/discover-bottom-button branch from 2db9cbf to 5a35009 Compare June 26, 2020 16:24
@dej611
Copy link
Contributor Author

dej611 commented Jun 29, 2020

@elasticmachine merge upstream

@dej611
Copy link
Contributor Author

dej611 commented Jun 29, 2020

@elasticmachine merge upstream

@kertal
Copy link
Member

kertal commented Jun 29, 2020

checked again, still LGTM 👍

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

✅ unchanged

History

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

Copy link
Contributor

@cchaos cchaos left a comment

Choose a reason for hiding this comment

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

LGTM! Safari and TS fixes for EuiSkipLink will get updated with the latest EUI

@dej611 dej611 merged commit a40e58e into elastic:master Jun 30, 2020
@dej611 dej611 deleted the deangularization/discover-bottom-button branch June 30, 2020 08:59
dej611 added a commit to dej611/kibana that referenced this pull request Jun 30, 2020
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
jloleysens added a commit to jloleysens/kibana that referenced this pull request Jun 30, 2020
…ata-streams

* 'master' of github.com:elastic/kibana: (50 commits)
  [Logs UI] [Alerting] "Group by" functionality (elastic#68250)
  [Discover] Deangularize Skip to bottom button (elastic#69811)
  Implement recursive plugin discovery (elastic#68811)
  Use ts-expect-error in platform code (elastic#69883)
  [SIEM][Detection Engine][Lists] Moves getQueryFilter to common folder for use by both front and backend
  [Ingest Manager][SECURITY SOLUTION] adjust config reassign link and add roundtrip to Reassignment flow (elastic#70208)
  [Security][Lists] Add API functions and react hooks for value list APIs (elastic#69603)
  [ILM] Fix bug when clearing priority field (elastic#70154)
  [Platform][Security] Updates cluster_manager ignorePaths to include security scripts (elastic#70139)
  [IngestManager] Allow to filter agent by packages (elastic#69731)
  [code coverage] exclude folders: test_helpers, tests_bundle (elastic#70199)
  [Metrics UI] UX improvements for saved views (elastic#69910)
  [APM] docs: unique transaction troubleshooting (elastic#69831)
  Cross cluster search functional test with minimun privileges assigned to the test_user (elastic#70007)
  [Maps] choropleth layer wizard (elastic#69699)
  Make custom errors by extending Error (elastic#69966)
  [Ingest Manager] Support updated package output structure (elastic#69864)
  Resolver test coverage (elastic#70246)
  Async Discover search test (elastic#64388)
  [ui-shared-deps] include styled-components (elastic#69322)
  ...

# Conflicts:
#	x-pack/plugins/snapshot_restore/server/types.ts
gmmorris added a commit to gmmorris/kibana that referenced this pull request Jun 30, 2020
…bana into alerting/consumer-based-rbac

* 'alerting/consumer-based-rbac' of github.com:gmmorris/kibana: (49 commits)
  [Discover] Deangularize Skip to bottom button (elastic#69811)
  Implement recursive plugin discovery (elastic#68811)
  Use ts-expect-error in platform code (elastic#69883)
  [SIEM][Detection Engine][Lists] Moves getQueryFilter to common folder for use by both front and backend
  [Ingest Manager][SECURITY SOLUTION] adjust config reassign link and add roundtrip to Reassignment flow (elastic#70208)
  [Security][Lists] Add API functions and react hooks for value list APIs (elastic#69603)
  [ILM] Fix bug when clearing priority field (elastic#70154)
  [Platform][Security] Updates cluster_manager ignorePaths to include security scripts (elastic#70139)
  [IngestManager] Allow to filter agent by packages (elastic#69731)
  [code coverage] exclude folders: test_helpers, tests_bundle (elastic#70199)
  [Metrics UI] UX improvements for saved views (elastic#69910)
  [APM] docs: unique transaction troubleshooting (elastic#69831)
  Cross cluster search functional test with minimun privileges assigned to the test_user (elastic#70007)
  [Maps] choropleth layer wizard (elastic#69699)
  Make custom errors by extending Error (elastic#69966)
  [Ingest Manager] Support updated package output structure (elastic#69864)
  Resolver test coverage (elastic#70246)
  Async Discover search test (elastic#64388)
  [ui-shared-deps] include styled-components (elastic#69322)
  SECURITY-ENDPOINT: add host properties (elastic#70238)
  ...
dej611 added a commit that referenced this pull request Jun 30, 2020
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Bamieh pushed a commit to Bamieh/kibana that referenced this pull request Jul 1, 2020
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Discover Discover Application release_note:skip Skip the PR/issue when compiling release notes Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.9.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Discover] Deangularize Skip to bottom button
5 participants