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
  • !35077

Manipulator: Add JSON parse support

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged GeoSot requested to merge gs/parse-json-config into main Sep 28, 2021
  • Overview 8
  • Commits 12
  • Pipelines 0
  • Changes 16

A proposal trying to solve the JSON data-attributes parsing issue.

Merging this PR, components will be able to parse JSON string values from element data attributes as configuration values. Edit: As an experimental add on, component elements can have a data-bs-config attribute that can house all the component config as JSON string. In case an element has data-bs-config='{"foo":123}' and data-bs-foo="456" attributes, final foo value will be 456, as the separate data attributes will override values given on data-bs-config

So the final config for each components will be a result of:

  • Defaults
  • data-bs-config
  • rest data attributes
  • configuration object given during instance initialization

I would appreciate any thoughts or doubts on it

Refs #34259, refs #34321, refs #35880 closes #34465 (closed)

TODO:

  • Document it
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: gs/parse-json-config