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

H-3542: Make use of entity/type icons consistently #5598

Merged
merged 11 commits into from
Nov 7, 2024

Conversation

CiaranMn
Copy link
Member

@CiaranMn CiaranMn commented Nov 7, 2024

🌟 What is the purpose of this PR?

We allow users to set an icon for entity types – currently, via an emoji picker. But these icons weren't being displayed consistently in the app (in most places, the default asterisk icon was used).

This PR improves that by:

  1. Making sure we use the appropriate icon next to entities and types:
    • in canvas tables and their headers (e.g. the entities and types tables)
    • in breadcrumbs
    • in the headers for entity editor, type editor, and equivalent slideovers
    • in chips in links tables
    • in the sidebar
  2. Makes the colour consistent (gray when related to an entity, blue for a type)
  3. Updates chips across canvas and React tables to have a blue up-right arrow next to clickable chips

It also adds supports for the icon property being a URL to an SVG.

Pre-Merge Checklist 🚀

🚢 Has this modified a publishable library?

This PR:

  • does not modify any publishable blocks or libraries, or modifications do not need publishing

📜 Does this require a change to the docs?

The changes in this PR:

  • are internal and do not require a docs change

🕸️ Does this require a change to the Turbo Graph?

The changes in this PR:

  • do not affect the execution graph

⚠️ Known issues

Inherited icons are not checked in most cases. This will be fixed in H-3363 by making use of the new 'closed' entity type schemas which resolve references to ancestors and work out what the nearest icon is.

Icons aren't used in the 'linked with' cell in the entity editor (non-readonly mode). H-3562.

📹 Demo

Screenshot 2024-11-07 at 11 43 07 Screenshot 2024-11-07 at 12 00 00

@github-actions github-actions bot added area/apps > hash* Affects HASH (a `hash-*` app) area/libs Relates to first-party libraries/crates/packages (area) type/eng > frontend Owned by the @frontend team type/eng > backend Owned by the @backend team area/apps labels Nov 7, 2024
@CiaranMn CiaranMn requested a review from vilkinsons November 7, 2024 12:00
Copy link

codecov bot commented Nov 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 20.08%. Comparing base (d0646a6) to head (e7e8552).
Report is 45 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5598      +/-   ##
==========================================
- Coverage   20.08%   20.08%   -0.01%     
==========================================
  Files         514      514              
  Lines       17373    17375       +2     
  Branches     2546     2546              
==========================================
  Hits         3490     3490              
- Misses      13845    13847       +2     
  Partials       38       38              
Flag Coverage Δ
apps.hash-ai-worker-ts 1.38% <ø> (ø)
apps.hash-api 1.17% <ø> (ø)
local.hash-backend-utils 8.80% <ø> (ø)
local.hash-isomorphic-utils 1.05% <ø> (-0.01%) ⬇️
local.hash-subgraph 24.54% <ø> (ø)

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.

@CiaranMn CiaranMn enabled auto-merge November 7, 2024 12:13
@CiaranMn CiaranMn added this pull request to the merge queue Nov 7, 2024
Merged via the queue into main with commit 8042684 Nov 7, 2024
69 checks passed
@CiaranMn CiaranMn deleted the cm/icons-in-entities-table branch November 7, 2024 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/apps > hash* Affects HASH (a `hash-*` app) area/apps area/libs Relates to first-party libraries/crates/packages (area) type/eng > backend Owned by the @backend team type/eng > frontend Owned by the @frontend team
Development

Successfully merging this pull request may close these issues.

2 participants