Closed RFSH closed 1 year ago
We discussed the property names and decided to formalize why some properties have chaise
in them and others don't. We want all the properties and class names to follow the same rule. The rule could be: If the feature is specific to chaise (and it's not an ermrestjs feature that other client tools can use), we should use chaise in their names. Or simply, if it's a class that ermrestjs knows about, we should keep it general.
This tooltip attribute is the only attribute that we have. The browser equivalent of this attribute is called title
. So we could argue that this is a chaise-specific feature; therefore, chaise
should be part of its name. That's why I'm using data-chaise-tooltip
for it. Other related attributes:
data-chaise-tooltip-placement
data-chaise-tooltip-no-icon
The following are the classes that we have and how we might want to change them:
Current name | proposed name | What it does | Notes |
---|---|---|---|
.chaise-btn |
No change | Shows chaise style of button | Not used by ermrestjs. Special chaise style |
.download-alt |
.chaise-download |
Chaise download button. Chaise also shows the same style with just `download` attribute. | Not used by ermrestjs. Special chaise style |
.download |
should we remove it? | Alternative for .chaise-btn .chaise-btn-primary |
Not used by ermrestjs. Special chaise style. Kept for backwards compatibility |
.vocab |
.chaise-vocab |
Add background color to the element to look like a chiclet | Not used by ermrestjs. Special chaise style. |
.chaise-autofill |
No change | Ensure the element fills the parent container. | Not used by ermrestjs. Special chaise style. |
.fullscreen-off |
.chaise-iframe-fullscreen-btn-off or .iframe-no-fullscreen-btn |
Hide the fullscreen button of iframes. | Not used by ermrestjs. Special chaise style. Although it's hiding a button that is always added by ermrestjs. |
.chaise-image-preview |
No change ? | Adds a simplified zoom capability to image. | Not used by ermrestjs. Special chaise style. We might eventually want to change the default display of assets to use this |
.chaise-color-preview |
.color-preview |
Hide the external icon that ermrestjs wants to add. | Automatically added by ermrestjs to columns typed rgb hex to show the color. |
.asset-permission |
No change | Chaise will send a HEAD request before opening/downloading the link | Automatically added by ermrestjs to links. |
.external-link |
No change | Clicking links with this class will open the "external link" popup in Chaise. | Automatically added by ermrestjs to links. |
.external-link-icon |
No change | Shows the external icon. | Automatically added by ermrestjs to links. |
.external-link-no-icon |
No change | Hide the external icon that ermrestjs wants to add. | Not used by ermrestjs. Special chaise style |
.hide-in-print |
No change | Elements with this class are hidden in print. | Added by ermrestjs to some markdown tags. |
.video-info-in-print |
.show-in-print |
Elements with this class are displayed in print. | Added by ermrestjs to video description, but there's no reason to be use a name this specific. |
The change to communicate columns that are asset related makes sense so we can better manage asset annotations and potential overlaps with multiple. Test cases passed locally for me.
This PR will,
data-chaise-tooltip
attribute to our markdown rendering that can be used for showing tooltips (#813).humanizeBytes
function (#984).humanizeBytes
to return the value with a tooltip.