prismicio / slice-simulator

Preview and develop Prismic slices fast with minimal configuration
6 stars 5 forks source link

feat: hide the Prismic toolbar when initialized #17

Closed angeloashmore closed 1 year ago

angeloashmore commented 1 year ago

Types of changes

Description

This PR automatically hides the Prismic toolbar when the simulator is initialized.

SimulatorManager injects a <style> element to the document's head with the following CSS:

iframe#prismic-toolbar-v2 {
  visibility: hidden !important;
}

The above CSS targets the Prismic toolbar's iframe and hides it from view. The toolbar continues to function in the background.

Checklist:

codecov-commenter commented 1 year ago

Codecov Report

Merging #17 (836679f) into master (b691bad) will decrease coverage by 0.79%. The diff coverage is 9.52%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##           master      #17      +/-   ##
==========================================
- Coverage   86.30%   85.51%   -0.79%     
==========================================
  Files          22       22              
  Lines        1920     1940      +20     
  Branches      128      128              
==========================================
+ Hits         1657     1659       +2     
- Misses        263      281      +18     
Files Changed Coverage Δ
src/kit/SimulatorManager.ts 16.05% <9.52%> (-0.62%) :arrow_down:
lihbr commented 1 year ago

Closed in favor of https://github.com/prismicio/prismic-toolbar/pull/118