pinknetworkx / atomicassets-contract

Smart Contract of the AtomicAssets standard.
MIT License
149 stars 88 forks source link

Link Type Request (Edit: Alias Request) #39

Closed dougbutner closed 3 years ago

dougbutner commented 3 years ago

I would like to request a type of link that allows links in the following formats

https://www.link.com/ https://www.link.com www.link.com link.com

Then the frontend could either display them all like link.com with the attr set href=https://www.link.com

dougbutner commented 3 years ago

I see now, after looking at these

'int8', 'int16', 'int32', 'int64', 'uint8', 'uint16', 'uint32', 'uint64', 'float32', 'float64', 'string', 'INT8_VEC', 'INT16_VEC', 'INT32_VEC', 'INT64_VEC', 'UINT8_VEC', 'UINT16_VEC', 'UINT32_VEC', 'UINT64_VEC', 'FLOAT_VEC', 'DOUBLE_VEC', 'STRING_VEC'

that it may not make sense to add a whole new type, but may be better to have a regx checker to see if it's a link and simply display that on the front end, or else allow link to be passed as an alias for string and only do the regx on those

jona-wilmsmann commented 3 years ago

This issue is something that we plan to address soon, likely by adding a new attribute called "display_data" to the collection_format in the config. This wouldn't require any code change, but instead would simply require the maintainers of the deployed contract to call the admincoledit action to add it.

We would then propose a standardized format for the display data, which would support specifying a media type for each attribute of a collection's schemas. Dapps could then read the display data attribute of a collection in order to display media types like images / videos / 3d models / links etc.

dougbutner commented 3 years ago

Perfect thanks for the clarification. Seems like a progressive solution.