geovistory / design-system

MIT License
2 stars 1 forks source link

Entity URI and Links in header #104

Closed perrauda closed 9 months ago

perrauda commented 10 months ago

In geov-entity

joschne commented 10 months ago

I see a challenge:

Currently, the component geov-entity is not aware of a project id.

Currently, the project entity pages of the website pass in the URI regex and replace props in order to add ?p=123 to the links. But the URI regex and replace are also used in dev/stag to convert http://geovistory.org/resource/i123 to http://dev.geovistory.org/resource/i123?p=123.

I propose to add another @Prop() to geov-entity:

If the projectId is set, the header has both links.

The "Project Link" can be the one generated by URI regex/replace. The "URI" should be the one generated by URI regex/replace minus ?p={projectId}.

Example 1 input:

output: URI: http://dev.geovistory.org/resource/i918611 | Project Link: http://dev.geovistory.org/resource/i918611?p=123

Example 2 input:

output: URI: http://geovistory.org/resource/i918611