Skip to content

Add functions and mixins to manipulate the utlities map#37114

Closed
romaricpascal wants to merge 8 commits intotwbs:mainfrom
romaricpascal:utilities-functions-mixin
Closed

Add functions and mixins to manipulate the utlities map#37114
romaricpascal wants to merge 8 commits intotwbs:mainfrom
romaricpascal:utilities-functions-mixin

Conversation

@romaricpascal
Copy link
Copy Markdown
Contributor

@romaricpascal romaricpascal commented Sep 9, 2022

Re-opening of #35977 after accidentally closing it on my repo (sorry again for that). @mdo, I hope I didn't lose any of your edits in the process as I've also rebased main to fix conflicts in the docs.

As a reminder of what it was about:

Code for #35945. Just threw some code in to get the shapes of the functions. Still need testing, handling all the cases (values not being maps for example), and docs updates (but I'll do that last once the code is set).

The PR adds the following:

  1. functions to get options, a specific option or a specific value for a given utility:
    a. utilities-get-options
    b. utilities-get-option
    c. utilities-get-value
  2. mixins to set options (in bulk or a specific one), new values or remove values for a given utility:
    a. utilities-set-options (defaults to merging with existing, but can be used to completely override by passing $merge: false, allowing to completely redefine a utility if necessary)
    b. utilities-set-option (just a thin wrapper on utilities-set-options)
    c. utilities-add-values
    d. utilities-remove-values
  3. mixins to add or remove utilities (they don't do as much as the rest, but provide consistency)
    a. utilities-add
    b. utilities-remove

Please let me know if there'd be one I missed, or if some are too much (2.b, 3.a. and 3.b for example only bring a consistent API by thinly wrapping other existing functions/mixins)

@romaricpascal romaricpascal requested a review from a team as a code owner September 9, 2022 11:17
@romaricpascal romaricpascal force-pushed the utilities-functions-mixin branch from 9acc5db to 03f43ee Compare September 9, 2022 11:21
@mdo mdo force-pushed the utilities-functions-mixin branch from 03f43ee to 8f2b9e7 Compare October 30, 2022 22:10
@mdo
Copy link
Copy Markdown
Member

mdo commented Oct 30, 2022

Replaced with #37398 :D.

@mdo mdo closed this Oct 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants