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

feat: Show more tags in browse and home #532

Merged
merged 27 commits into from
Aug 17, 2020
Merged

Conversation

allisonsuarez
Copy link
Contributor

@allisonsuarez allisonsuarez commented Aug 3, 2020

Summary of Changes

Amundsen currently shows a small list of curated tags on both the homepage and browse. This is built using a FE configuration which explicitly lists out a set of approved tags to show on this widget. Since this list is manually curated but not updated, this list isn't necessarily the best set of tags to show. Additionally the "/browse" page shows the same content as the homepage, which isn't very useful. We should remove the manually curated list of tags.

The browse component should have two parts:

  1. "Popular Tags" section that shows the top X tags based on usage.
  2. "All Tags" section that shows all other tags not in the "Top Tags" section.

No curated tags specified: get popular tags sorted by usage (X number)
Curated tags specified: display curated tags under popular tags (not sorted)
Config showAllTags is true: same behavior as before on home page, show curated followed by a line and then all other tags under, this doesn't affect Browse page anymore.

Tests

What tests did you add or modify and why? If no tests were added or modified, explain why. Remove this line

Documentation

What documentation did you add or modify and why? Add any relevant links then remove this line

CheckList

Make sure you have checked all steps below to ensure a timely review.

  • PR title addresses the issue accurately and concisely. Example: "Updates the version of Flask to v1.0.2"
  • PR includes a summary of changes, including screenshots of any UI changes.
  • PR adds unit tests, updates existing unit tests, OR documents why no test additions or modifications are needed.
  • In case of new functionality, my PR adds documentation that describes how to use it.
    • All the public python functions and the classes in the PR contain docstrings that explain what it does
  • PR passes all tests documented in the developer guide

@allisonsuarez allisonsuarez marked this pull request as draft August 3, 2020 22:51
@codecov-commenter
Copy link

codecov-commenter commented Aug 3, 2020

Codecov Report

Merging #532 into master will decrease coverage by 5.44%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #532      +/-   ##
==========================================
- Coverage   81.16%   75.71%   -5.45%     
==========================================
  Files         230       42     -188     
  Lines        5718     1816    -3902     
  Branches      676      174     -502     
==========================================
- Hits         4641     1375    -3266     
+ Misses       1009      391     -618     
+ Partials       68       50      -18     
Impacted Files Coverage Δ
amundsen_application/static/js/utils/logUtils.ts
...tic/js/components/TableDetail/WriterLink/index.tsx
...tion/static/js/components/TableDetail/constants.ts
...application/static/js/ducks/announcements/types.ts
...atic/js/components/common/LoadingSpinner/index.tsx
...js/components/TableDetail/WatermarkLabel/index.tsx
...ts/common/ResourceListItem/TableListItem/index.tsx
...pplication/static/js/ducks/popularTables/api/v0.ts
...s/components/DashboardPage/QueryListItem/index.tsx
...ts/SearchPage/SearchFilter/FilterSection/index.tsx
... and 174 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ffea88d...cf7c7f4. Read the comment docs.

render() {
const { isLoading, curatedTags, otherTags } = this.props;

if (isLoading) {
return <ShimmeringTagListLoader />;
}

const filteredTags = otherTags.filter((tag) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should I filter out tags with usage of 0 in the Curated Tags section as well? Was hesitant because it affects previous behavior, on the upside it might help keeping curated tags less stale.

@allisonsuarez allisonsuarez changed the title [feat] Show more tags in browse and home feat: Show more tags in browse and home Aug 6, 2020
@allisonsuarez allisonsuarez marked this pull request as ready for review August 6, 2020 20:23
Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com>
Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com>
…ction getPopularTags, commented out all tests for TagsList because rewrite will be necessary

Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com>
…onality implemented on TagsList, still need to do some work to make section not show up when no tags exist

Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com>
… page, as well as two section brose page displayz'

Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com>
Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com>
Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com>
Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com>
…ented title switching base don curated vs popular tags

Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com>
Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com>
…ed tags with 0

Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com>
Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com>
Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com>
Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com>
Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com>
@allisonsuarez allisonsuarez force-pushed the asuarezmiranda-more-tags branch from 3fec7e8 to eed74c7 Compare August 11, 2020 19:31
Copy link
Member

@Golodhros Golodhros left a comment

Choose a reason for hiding this comment

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

Looks good!
Some minor comments

Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com>
@allisonsuarez allisonsuarez force-pushed the asuarezmiranda-more-tags branch from ddc99c9 to b1c141a Compare August 11, 2020 20:44
Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com>
@allisonsuarez allisonsuarez force-pushed the asuarezmiranda-more-tags branch from e78dbd1 to c8779cd Compare August 11, 2020 20:51
Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com>
Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com>
Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com>
Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com>
Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com>
Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com>
Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com>
Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com>
Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com>
Golodhros
Golodhros previously approved these changes Aug 14, 2020
Copy link
Member

@Golodhros Golodhros left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@Golodhros Golodhros left a comment

Choose a reason for hiding this comment

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

LGTM

@allisonsuarez allisonsuarez merged commit 4f6164d into master Aug 17, 2020
@allisonsuarez allisonsuarez deleted the asuarezmiranda-more-tags branch August 17, 2020 17:17
Copy link
Contributor

@ttannis ttannis left a comment

Choose a reason for hiding this comment

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

Can we remove all TODO comments and instead create issues for them in the public repo, with details and tagged as "help wanted" and good first issue? Thanks!

@@ -0,0 +1,73 @@
export const allTestTags = [
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: This is just tags, but be careful of copy pasting our staging dummy data and committing that code. It's best to commit our own dummy data always.

jerryzhu2007 pushed a commit to kylg/amundsenfrontendlibrary that referenced this pull request Aug 20, 2020
* commit 'd2f222ea5cb648fb4a9d9bd2e242a3b36281098d': (63 commits)
  feat: Update 'table view', 'alumni' and SLA status badges (amundsen-io#595)
  build: Adding betterer to workflow (amundsen-io#598)
  build(deps): bump flask-restful from 0.3.7 to 0.3.8 (amundsen-io#553)
  chore: Removes 84 unused variables (amundsen-io#600)
  chore: remove travis badge and update doc link (amundsen-io#599)
  Fixes error on TableDetail on Dev (amundsen-io#597)
  chore: Bump version for pypi release. (amundsen-io#596)
  feat: Announcements in Homepage (amundsen-io#591)
  build(deps-dev): bump @babel/plugin-proposal-logical-assignment-operators (amundsen-io#574)
  build(deps): [security] bump lodash in /amundsen_application/static (amundsen-io#587)
  build(deps-dev): bump @babel/plugin-proposal-export-namespace-from (amundsen-io#588)
  build(deps-dev): bump lint-staged in /amundsen_application/static (amundsen-io#590)
  chore: fix docker push action (amundsen-io#593)
  feat: add github actions for FE (amundsen-io#592)
  chore: Re-useable OwnerEditor (amundsen-io#548)
  feat: Show more tags in browse and home  (amundsen-io#532)
  Organizes, themes and adds typography stories (amundsen-io#578)
  docs: describe storybook (amundsen-io#577)
  Fixes TypeScript issues with sagas and saga tests (amundsen-io#573)
  build(deps-dev): bump @babel/core in /amundsen_application/static (amundsen-io#558)
  ...

# Conflicts:
#	amundsen_application/api/utils/metadata_utils.py
#	amundsen_application/oidc_config.py
#	amundsen_application/static/js/components/TableDetail/ColumnList/index.tsx
#	amundsen_application/static/js/components/TableDetail/ColumnListItem/index.tsx
#	amundsen_application/static/js/components/TableDetail/constants.ts
#	amundsen_application/static/js/components/TableDetail/index.tsx
#	amundsen_application/static/js/config/index.spec.ts
#	amundsen_application/static/js/ducks/tableMetadata/reducer.ts
#	amundsen_application/static/js/fixtures/globalState.ts
#	amundsen_application/static/js/fixtures/metadata/table.ts
#	amundsen_application/static/js/interfaces/TableMetadata.ts
#	docs/application_config.md
#	requirements.txt
#	setup.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants