Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Merge requests
  • !35977

Add functions and mixins to manipulate the utlities map

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/romaricpascal/utilities-functions-mixins into main Mar 09, 2022
  • Overview 7
  • Commits 0
  • Pipelines 0
  • Changes 0

Created by: romaricpascal

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)

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/romaricpascal/utilities-functions-mixins