Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "chaise" namespace to all the special classes and attributes #989

Open
RFSH opened this issue Aug 30, 2023 · 0 comments
Open

Add "chaise" namespace to all the special classes and attributes #989

RFSH opened this issue Aug 30, 2023 · 0 comments
Labels
investigation required Requires some initial investigation

Comments

@RFSH
Copy link
Member

RFSH commented Aug 30, 2023

As part of #958, I've added a new attribute, which brought up a discussion about attributes and class names. Given that we want to avoid collision of our special attribute/class names with outside ones, we decided to always add the chaise namespace. We thought the distinction between ermrestjs and chaise doesn't matter in this case, and we just want a namespace that signals it as our internal tool.

The following is the list of class names and their new names:

Current name New name Notes
.chaise-btn No change
.download-alt .chaise-download Chaise download button. Chaise also shows the same style with just `download` attribute.
.download should we remove it? Alternative for .chaise-btn .chaise-btn-primary (Kept for backwards compatibility)
.vocab .chaise-vocab
.chaise-autofill No change
.fullscreen-off .chaise-iframe-fullscreen-btn-off
.chaise-image-preview No change
.chaise-color-preview No change
.asset-permission .chaise-asset-permission
.external-link .chaise-external-link
.external-link-icon .chaise-external-link-icon
.external-link-no-icon .chaise-external-link-no-icon
.hide-in-print .chaise-hide-in-print
.video-info-in-print .chaise-show-in-print Added by ermrestjs to video description, but there's no reason to be use a name this specific.

While discussing this change, we also talked about backward compatibility.

  • We decided that our first change should still keep the old names, and we should offer ways to facilitate the migration process.
  • We should develop a programmatic way (a regular expression that can be used in an ermrest query or a script) to find whether these old class names are used in the database.
  • Another suggestion was to introduce a flag so they can switch between the old and new ones (not sure how helpful this might be and requires more thinking).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigation required Requires some initial investigation
Projects
None yet
Development

No branches or pull requests

1 participant