TACC / Core-CMS-Custom

Customized Core CMS code and builds
5 stars 0 forks source link

chore(apcd): use c-message css from cdn #217

Closed wesleyboar closed 11 months ago

wesleyboar commented 12 months ago

Overview

Load c-message styles from CDN.

The goals of this PR are to (1) load explicit version of c-message styles, (2) make any APCD-specific edits of this pattern clearly be from APCD.

Note If you have concerns about using a CDN, please share. I want to know. Example concern: I once used a CDN that died, and our CMS web text editor load was quite delayed until it gave up loading the stylesheet (https://github.com/TACC/Core-CMS/pull/643).

Related

Changes

Testing

Create an error message, and confirm its style is unchanged.

E.g. #208

  1. Open http://localhost:8000/register/request-to-submit/.
  2. On the Entities section, click the [+ Add Another Entity] button until you reach the max number of entities
  3. After adding final entity, verify:
    • the message style has unchanged
    • the styles are from CDN

Core-Styles v0 Message Link Color Bug

  1. Open http://localhost:8000/register/request-to-submit/.
  2. In DevTools, in Console, run:
    [ ...document.querySelectorAll('[required]') ].forEach( x => {
        x.removeAttribute('required');
    });
    [ ...document.querySelectorAll('.required:not(:has([required]))') ].forEach( x => {
        x.classList.remove('required');
    });
  3. Submit form.
  4. Verify submit a ticket is not the same color as text before it.

UI

208

message
after

Core-Styles v0 Message Link Color Bug

❌ before 895e121 ✅ after 895e121
before after
wesleyboar commented 12 months ago

Investigating the unexpected <a> style.

wesleyboar commented 12 months ago

@edmondsgarrett, thanks for your thorough testing. I caused that and it is not expected. It is a Core-Styles v0 bug. And in this PR I had deleted a fix. I have implemented a new fix via 895e121.