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

Use JSON.parse in dropdown.js for passing JSON as data attribute

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/719media/patch-12 into main Jun 21, 2021
  • Overview 2
  • Commits 6
  • Pipelines 0
  • Changes 4

Created by: 719media

@GeoSot

  1. There is literally only a try catch around a JSON.parse, before the config types are checked. I don't think it should be abstracted out at this point. Too simple.
  2. I did not throw an error, since it happens before "DefaultType" check as you mentioned, so the "DefaultType" check catches any errors anyway. So, I'm swallowing JSON.parse errors as before
  3. I'm not really sure this needs major testing, it's fairly straightforward to me, but let me know.

I guess the only question I have now is, is it worth it to Bootstrap author to include this? As a reminder, the whole point of this PR was to get popper to expose "strategy" parameter, which, IMO, is a commonly used parameter for popper integrations to escape overflow problems. Certainly this PR allows for more options, and it is fairly simple in code addition. I went ahead and added the same configuration to the only other component I saw using popper, tooltip.js

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/719media/patch-12