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

FP-1414: More Classnames for Django CMS Style Plugin #419

Merged
merged 7 commits into from Feb 25, 2022

Conversation

wesleyboar
Copy link
Member

@wesleyboar wesleyboar commented Dec 13, 2021

Overview

Add more class names1 for UI patterns via

  • quick, simple UI2
  • low-maintenance code

Issues

Screenshots

FP-1318.Section.Pattern.via.Style.Plugin.mov

Testing

local: instructions
remote: https://dev.cep.tacc.utexas.edu/ (build, deploy)

On a test page:

  1. Create Style plugin.
  2. Create Text plugin, nest under Style plugin.
  3. Set "CLASS NAME" to some of the available values.
  4. Confirm Style plugin instance has classnames from each choice.

Notes

Comparison of Solutions
Plugin Entry Method Input Method Pros Cons
Style "Class Name" one dropdown field quick to find, min. maintenance assumes CSS knowledge
Style "Adv. Settings" → "Additional Classes" comma-delimited list zero maintenance assumes CSS knowledge, slow to find
others "Adv. Settings" → "Attributes" + class space delimited list zero maintenance, consistent assumes CSS knowledge, slow to find
custom plugin field choices one or more dropdown fields easy to find, could be most intuitive high maintenance, initial attempts unintuitive

Related PRs

Footnotes

  1. Not all class name combinations would be provided, because that would create too long a list. To support other combinations, a skilled CMS editor can add a comma-delimited list to Style plugin instance at "Adv. Settings" → "Additional Classes".3

  2. The UI is approved by our primary CMS Admin/Editor. The UI is not too complex for a regular CMS editor.

  3. This is the second solution/entry of the table in "Notes" → "Comparison of Solutions" (in this PR description).

This allows easy & consistent UI to set appropriate base & mod. classes.

Previous solutions were:
- Style plugin: "Adv. Settings" → "Additional Classes" (comma-delimited)
- others: "Adv. Settings" → "Attributes" + `class` (space delimited)
- custom plugin: (class list built from plugin field choices)
@wesleyboar wesleyboar changed the title Quick: Classnames for Django CMS Style Plugin FP-1414: Classnames for Django CMS Style Plugin Dec 13, 2021
@wesleyboar wesleyboar marked this pull request as draft December 13, 2021 23:39
@wesleyboar wesleyboar added the alternative Alternative solution(s) exist(s) label Jan 19, 2022
@wesleyboar wesleyboar force-pushed the quick/alternative-to-plugin-simply-for-ui-pattern branch from fe13bd5 to 3496b9a Compare January 19, 2022 17:02
@wesleyboar wesleyboar marked this pull request as ready for review January 20, 2022 16:45
@wesleyboar wesleyboar changed the title FP-1414: Classnames for Django CMS Style Plugin FP-1414: More Classnames for Django CMS Style Plugin Feb 18, 2022
@wesleyboar
Copy link
Member Author

Merging based on approval of #430 which demo'd and suggested this code also.

@wesleyboar wesleyboar merged commit c5662b1 into main Feb 25, 2022
@wesleyboar wesleyboar deleted the quick/alternative-to-plugin-simply-for-ui-pattern branch February 25, 2022 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alternative Alternative solution(s) exist(s)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant