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

Remove the extra 'white-space: normal' CSS for FidesJS HTML descriptions #4850

Merged
merged 4 commits into from
May 1, 2024

Conversation

NevilleS
Copy link
Contributor

@NevilleS NevilleS commented May 1, 2024

Description Of Changes

This removes a tiny little CSS override when using HTML descriptions in FidesJS components. The net result is that, by default, FidesJS is going to treat whitespace as significant when provided by the Admin UI forms, which is just more intuitive for end-users: we implicitly want to write paragraphs of text with newlines, etc.

This'll make it easier to support a real rich text editor in the future, too, by not rendering our plaintext/richtext descriptions with slightly different CSS rules.

FYI: I was the one that put this CSS rule there in the first place, because I thought (incorrectly!) that this would be a safer default for HTML descriptions, but that's just hogwash and I see the error of my ways now.

I checked to ensure that all existing usage of HTML descriptions is unaffected by this change, so let's do this now before it would actually break something!

Code Changes

  • Remove extra .fides-html-description CSS

Steps to Confirm

Run the Cypress tests to take a look at how we style the same example HTML description with/without HTML support enabled...

Plaintext Richtext
image image

Pre-Merge Checklist

Copy link

vercel bot commented May 1, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
fides-plus-nightly ⬜️ Ignored (Inspect) Visit Preview May 1, 2024 7:18pm

Copy link

cypress bot commented May 1, 2024

Passing run #7545 ↗︎

0 4 0 0 Flakiness 0

Details:

Merge 3457664 into 658c773...
Project: fides Commit: 04aeaf04e1 ℹ️
Status: Passed Duration: 00:35 💡
Started: May 1, 2024 7:29 PM Ended: May 1, 2024 7:30 PM

Review all test suite changes for PR #4850 ↗︎

@NevilleS NevilleS merged commit e273a1d into main May 1, 2024
13 checks passed
@NevilleS NevilleS deleted the ns-remove-extra-html-description-css branch May 1, 2024 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants