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

[HomePage] Add home page static list card #7351

Merged
merged 6 commits into from
Jul 22, 2024

Conversation

raintygao
Copy link
Contributor

@raintygao raintygao commented Jul 22, 2024

Description

Add home page static list card

Screenshot

image

Testing the changes

Enable new homepage and go to homepage.

Changelog

  • feat: Add home page static list card

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

Signed-off-by: tygao <tygao@amazon.com>
import { EuiCard, EuiLink, EuiListGroup } from '@elastic/eui';

export const LEARN_OPENSEARCH_CONFIG = {
title: 'Learn Opensearch',
Copy link
Member

Choose a reason for hiding this comment

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

Shall we at least wrap it with i18n?

Copy link

codecov bot commented Jul 22, 2024

Codecov Report

Attention: Patch coverage is 43.75000% with 9 lines in your changes missing coverage. Please review.

Project coverage is 67.70%. Comparing base (d30677d) to head (6a999a7).

Files Patch % Lines
...rc/plugins/home/public/application/home_render.tsx 11.11% 8 Missing ⚠️
...e/public/application/components/home_list_card.tsx 85.71% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7351      +/-   ##
==========================================
- Coverage   67.70%   67.70%   -0.01%     
==========================================
  Files        3519     3520       +1     
  Lines       69685    69700      +15     
  Branches    11374    11376       +2     
==========================================
+ Hits        47183    47189       +6     
- Misses      19708    19716       +8     
- Partials     2794     2795       +1     
Flag Coverage Δ
Linux_1 33.18% <25.00%> (-0.01%) ⬇️
Linux_2 55.46% <ø> (ø)
Linux_3 43.30% <25.00%> (-0.01%) ⬇️
Linux_4 34.71% <43.75%> (+<0.01%) ⬆️
Windows_1 33.20% <25.00%> (-0.01%) ⬇️
Windows_2 55.41% <ø> (ø)
Windows_3 43.32% <25.00%> (-0.01%) ⬇️
Windows_4 34.71% <43.75%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

) : null
}
>
<EuiListGroup listItems={config.list} color="text" size="s" />
Copy link
Member

Choose a reason for hiding this comment

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

If description is needed, I think we should use DescriptionList component https://oui.opensearch.org/1.8/#/display/description-list

Signed-off-by: tygao <tygao@amazon.com>
@SuZhou-Joe
Copy link
Member

Nit: Shall we move the View all to the bottom of the card?
image

@raintygao
Copy link
Contributor Author

raintygao commented Jul 22, 2024

Nit: Shall we move the View all to the bottom of the card? image

image

According to latest design, it shows that this link is not docked to bottom. So i didn't implement this for now. But im glad to use some style like flex to make it docked to bottom in next update if needed.

@SuZhou-Joe SuZhou-Joe merged commit e64de15 into opensearch-project:main Jul 22, 2024
70 of 72 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jul 22, 2024
* feat: add home static list card

Signed-off-by: tygao <tygao@amazon.com>

* Changeset file for PR #7351 created/updated

* update link property

Signed-off-by: tygao <tygao@amazon.com>

* add i18n and description

Signed-off-by: tygao <tygao@amazon.com>

---------

Signed-off-by: tygao <tygao@amazon.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
(cherry picked from commit e64de15)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@raintygao
Copy link
Contributor Author

Nit: Shall we move the View all to the bottom of the card? image

image

According to latest design, it shows that this link is not docked to bottom. So i didn't implement this for now. But im glad to use some style like flex to make it docked to bottom in next update if needed.

Have added a comment to confirm with designers.

ruanyl pushed a commit that referenced this pull request Jul 22, 2024
* feat: add home static list card



* Changeset file for PR #7351 created/updated

* update link property



* add i18n and description



---------



(cherry picked from commit e64de15)

Signed-off-by: tygao <tygao@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jul 23, 2024
* feat: add home static list card

* Changeset file for PR #7351 created/updated

* update link property

* add i18n and description

---------

(cherry picked from commit e64de15)

Signed-off-by: tygao <tygao@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
(cherry picked from commit 6685bce)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
SuZhou-Joe pushed a commit that referenced this pull request Jul 23, 2024
* feat: add home static list card

* Changeset file for PR #7351 created/updated

* update link property

* add i18n and description

---------

(cherry picked from commit e64de15)





(cherry picked from commit 6685bce)

Signed-off-by: tygao <tygao@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants