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

Allow popovers examples to be tried on StackBlitz

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Julien Déramond requested to merge github/fork/julien-deramond/main-jd-stackblitz-and-popovers into main Apr 07, 2022
  • Overview 22
  • Commits 1
  • Pipelines 0
  • Changes 5

This PR tries to allow popovers examples to be tried on StackBlitz.

In the documentation, they need some JS available in site/assets/js/snippets.js. IMHO it would be troubling to have all this file integrated in StackBlitz. So in this PR I'm trying to:

  • Split site/assets/js/snippets.js into small reusable parts
  • Create a new javascript parameter for the example shortcode containing the name of the reusable JS file to embed into StackBlitz
  • Allow site/layouts/partials/scripts.html to gather this information and embed the content of the JS file in a <script>.

Sub-tasks

  • Instead of using <script>, try to create a real index.js file in StackBlitz imported by index.html.
  • Find a better way to share the JS name between the doc, the shortcode and the site/layouts/partials/scripts.html
  • Security concerns to gather some JS file content?

Live previews

  • Live demo
  • Four directions
  • Custom popovers—Not working because doesn't exist in 5.1.3
    • That's a problem because we will only be able to suppose that the components will work on StackBlitz when we develop them. We will have to wait until it they are released in order to see if it is OK or not.
  • Dismiss on next click
  • Disabled elements

Not tackled here

  • Be able to pass multiple JS files (might be useful for other examples more complex)—we will see that while developing the fix for the other components
  • Be able to split the SCSS file used by examples and to pass it (them) like the JS files
  • (Optional) Hide some examples if too complex or impossible to try on StackBlitz
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/julien-deramond/main-jd-stackblitz-and-popovers