You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the header is defined like so. darkThemeLogo feels like an arbitrary decided key, it doesn't look like this pattern can scale to support more assets.
The default key shall be required, dark shall be optional. The fields are meant to be same as the attributes allowed in a img tag, the reason for this is so that we can easily support responsive images if needed, sometimes it is also desired for us to be able to customize the tooltip that the browser shows when you hover over an image (e.g. a company logo should show the name of the company, and not some placeholder like "headerLogo").
Note that is proposal only applies to image assets.
Implementation considerations
The proposal allows us to parse the json and use it "as is" in a img tag, this may seem like a security red flag, but I think it is fine as this json is embedded into the app through webpack, we never accept any user input to load these information at run time.
Alternatives
Additional information
The text was updated successfully, but these errors were encountered:
Feature request
Description
Currently the header is defined like so.
darkThemeLogo
feels like an arbitrary decided key, it doesn't look like this pattern can scale to support more assets.I propose this conventional instead:
The
default
key shall be required,dark
shall be optional. The fields are meant to be same as the attributes allowed in aimg
tag, the reason for this is so that we can easily support responsive images if needed, sometimes it is also desired for us to be able to customize the tooltip that the browser shows when you hover over an image (e.g. a company logo should show the name of the company, and not some placeholder like "headerLogo").Note that is proposal only applies to image assets.
Implementation considerations
The proposal allows us to parse the json and use it "as is" in a
img
tag, this may seem like a security red flag, but I think it is fine as this json is embedded into the app through webpack, we never accept any user input to load these information at run time.Alternatives
Additional information
The text was updated successfully, but these errors were encountered: