geovistory / design-system

MIT License
2 stars 1 forks source link

Fix geov-entity for embedding in website #92

Closed joschne closed 10 months ago

joschne commented 11 months ago

Problem 1: Download RDF Button icons Icons do not appear:

image

Solution 1 use "icon" attribute in ion-icon.

Problem 2 Class Label is rendered twice.

image

The problem seems to be caused by inproper hydration:

image

The string "Person" (rendered on server side) is not removed / attatched to the slot. It is unclear why.

Solution 2

Add two tests for component geov-entity-class-label that reproduce the problem.

Test 1: (as in geov-entity-download-rdf.spec.tsx lines 62ff.)

Render the geov-entity-class-label server side

Test 2: (as in geov-entity-download-rdf.spec.tsx lines 123ff.)

Then figure out a solution. Maybe it is enough to wrap the content of the component in a div.

perrauda commented 11 months ago

Update: Tests of geov-entity-class-label are passed (no bug), so I'll create two news tests in geov-entity.

joschne commented 10 months ago

issue is resolved by this commit.

Changing <p> to <div> resolved the issue.