Linkify link shortening should be made configurable(?) s.th. the raw text can be copied
Summary
When BUILD_MODULE_EXT_COSMETICS_LINKIFY=ENABLED
, long (currently hard-coded more than 40 characters) links are shortened, see
where
https://doi.org/something-very-long-that-should-be-configurable
is shortened to
<a title="Open https://doi.org/something-very-long-that-should-be-configurable in a new tab." target="_blank" class="caosdb-v-property-href-value" href="https://doi.org/something-very-long-that-should-be-configurable">
https://doi.org/something-very-long[...] <i class="bi bi-box-arrow-up-right"></i>
</a>
This is desirable for the display of long links, but is problematic when users want to copy the text contents of the property value, since the link appears shortened with the square brackets [...]
.
It is not entirely clear how to solve this in an elegant way. Simple solutions could be to make the minimum number of characters for link shortening configurable (only postpones the problem to the first link that is longer than the configured number), or to disable link shortening altogether via a build variable (problematic for the display of long links, though).
The best solution, though this requires more work, is probably to introduce a way (button, cf. gitlab's copy commit hash button?) to copy the raw text content of a property value to clipboard. This can be recycled for a lot of other cases, where the display of property values is changed.