-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pop Up Modal #1197
Merged
Merged
Pop Up Modal #1197
Changes from 11 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
044b6d1
Added basic update modal with slideshow functionality
dhochbaum-dcp 401981d
Added looping, start on random slide
dhochbaum-dcp 8ca534d
Added new slides
dhochbaum-dcp 202d2b0
Corrected bolding
dhochbaum-dcp e4f73e9
Added superscript to main header, new section to features page
dhochbaum-dcp 2b07fba
Corrected typos, added other features to /features. Only the Zoning D…
dhochbaum-dcp 58eb9c4
Changed slide background color to light gray
dhochbaum-dcp df80847
Updated modal text
dhochbaum-dcp 2607a62
Merge branch 'develop' into DH0-announcement-modal
dhochbaum-dcp c7d3899
Fixed merge issues
dhochbaum-dcp 369bd9b
Updated modal message
dhochbaum-dcp 5b36ef1
Removed comments
dhochbaum-dcp File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import Component from '@ember/component'; | ||
|
||
const TOTAL_SLIDES = 7; | ||
|
||
export default Component.extend({ | ||
tagName: '', | ||
open: true, | ||
slideNumber: Math.floor(Math.random() * TOTAL_SLIDES) + 1, // start on a random slide | ||
|
||
actions: { | ||
toggleModal() { | ||
this.toggleProperty('open'); | ||
}, | ||
nextSlide() { | ||
if (this.slideNumber < TOTAL_SLIDES) { | ||
this.set('slideNumber', this.slideNumber + 1); | ||
} else { | ||
// comment out the line below to disable infinite looping | ||
this.set('slideNumber', 1); | ||
} | ||
}, | ||
prevSlide() { | ||
if (this.slideNumber > 1) { | ||
this.set('slideNumber', this.slideNumber - 1); | ||
} else { | ||
// comment out the line below to disable infinite looping | ||
this.set('slideNumber', TOTAL_SLIDES); | ||
} | ||
}, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
// -------------------------------------------------- | ||
// Module: Reveal Modal | ||
// -------------------------------------------------- | ||
|
||
#reveal-modal-container { | ||
z-index: 3; | ||
} | ||
|
||
@include breakpoint(1280px up) { | ||
.mobile-header, | ||
.mobile-body { | ||
display: none; | ||
} | ||
} | ||
|
||
|
||
.reveal-overlay { | ||
padding: 1rem; | ||
|
||
@include breakpoint(medium) { | ||
padding: 8rem 1rem; | ||
// position: absolute; | ||
} | ||
} | ||
|
||
.reveal-overlay-target { | ||
position: absolute; | ||
top: 0; | ||
right: 0; | ||
bottom: 0; | ||
left: 0; | ||
} | ||
|
||
.reveal { | ||
border: 0; | ||
box-shadow: 0 0 0 rem-calc(4) rgba(0,0,0,0.1); | ||
top: 0; | ||
border-radius: 5px; | ||
padding-top: 40px; | ||
|
||
&:focus { | ||
outline: none; | ||
} | ||
} | ||
|
||
/* Slideshow container */ | ||
.slideshow-container { | ||
position: relative; | ||
/* should we keep this? */ | ||
min-height: 10rem; | ||
} | ||
|
||
/* Next & previous buttons */ | ||
.slideshow-prev, .slideshow-next { | ||
cursor: pointer; | ||
position: absolute; | ||
top: 50%; | ||
width: auto; | ||
padding: 16px; | ||
margin-top: -22px; | ||
color: white; | ||
font-weight: bold; | ||
font-size: 48px; | ||
transition: 0.6s ease; | ||
border-radius: 0 3px 3px 0; | ||
user-select: none; | ||
background-color: rgba(0,0,0,0.1); | ||
} | ||
|
||
/* Position the "next button" to the right */ | ||
.slideshow-next { | ||
right: 0; | ||
border-radius: 3px 0 0 3px; | ||
} | ||
|
||
/* On hover, add a black background color with a little bit see-through */ | ||
.slideshow-prev:hover, .slideshow-next:hover { | ||
background-color: rgba(0,0,0,0.8); | ||
} | ||
|
||
.slideshow-content { | ||
text-align: center; | ||
margin-bottom: 1rem; | ||
} | ||
|
||
.slide { | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
padding-top: 1rem; | ||
background-color: lightgray; | ||
} | ||
|
||
.slide img { | ||
height: 350px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<RevealModal @open={{this.openModal}} @closeModal={{this.toggleModal}}> | ||
<h1 class='header-large'> | ||
We're excited to share some new features we've added to ZoLa! Scroll through the updates below, or select the "Features" tab at any time to view the new additions. | ||
</h1> | ||
|
||
<div class="slideshow-container"> | ||
<a class="slideshow-prev" onclick={{action 'prevSlide'}}>❮</a> | ||
<SlideshowContents @slideNumber={{this.slideNumber}} /> | ||
<a class="slideshow-next" onclick={{action 'nextSlide'}}>❯</a> | ||
</div> | ||
|
||
{{input type="checkbox" checked=this.dontShowModalAgain}} | ||
Don't show this message again | ||
|
||
{{!-- Uncomment the below to show a message only on mobile --}} | ||
{{!-- <h1 class='header-large mobile-header'> | ||
labs-zola is optimized for desktop screen widths. | ||
</h1> | ||
<p class='lead mobile-body'> | ||
Mobile support for ZoLa will be added in the future. | ||
For the best experience, please use a browser with a minimum width of | ||
1280px. | ||
</p> --}} | ||
</RevealModal> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{{#if @open}} | ||
<div class="reveal-overlay" style="display:block;"> | ||
<div class="reveal-overlay-target" {{action @closeModal}}></div> | ||
<div | ||
class="reveal" | ||
role="dialog" | ||
aria-hidden="false" | ||
tabindex="-1" | ||
style="display:block;" | ||
> | ||
{{yield}} | ||
<button {{action @closeModal}} class="close-button" aria-label="Close modal" type="button"> | ||
<span aria-hidden="true">×</span> | ||
</button> | ||
</div> | ||
</div> | ||
{{/if}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<div class="slideshow-content"> | ||
{{#if (eq @slideNumber 1)}} | ||
<div class="slide"> | ||
<p>Access what you're looking for more quickly using your <strong>search history</strong></p> | ||
<img src="/img/slideshow/search-history.gif" alt="A video showing the search history functionality" /> | ||
</div> | ||
{{else if (eq @slideNumber 2)}} | ||
<div class="slide"> | ||
<p>See more of the map by <strong>hiding the layers menu</strong></p> | ||
<img src="/img/slideshow/toggle-sidebar.gif" alt="A video showing the sidebar toggle functionality" /> | ||
</div> | ||
{{else if (eq @slideNumber 3)}} | ||
<div class="slide"> | ||
<p><strong>Select two tax lots</strong> for side-by-side comparison</p> | ||
<img src="/img/slideshow/side-by-side.gif" alt="A video showing the tax lot comparison functionality" /> | ||
</div> | ||
{{else if (eq @slideNumber 4)}} | ||
<div class="slide"> | ||
<p><strong>Turn off all layers</strong> with the click of a button</p> | ||
<img src="/img/slideshow/toggle-all-layers-off.gif" alt="A video showing the all layer toggle button functionality" /> | ||
</div> | ||
{{else if (eq @slideNumber 5)}} | ||
<div class="slide"> | ||
<p><strong>Bookmark your selected layers</strong> to return to later</p> | ||
<img src="/img/slideshow/bookmark-layer-sets.gif" alt="A video showing the layer bookmark functionality" /> | ||
</div> | ||
{{else if (eq @slideNumber 6)}} | ||
<div class="slide"> | ||
<p>Sum the area or distance of <strong>multiple measurements</strong></p> | ||
<img src="/img/slideshow/multiple-measurements.gif" alt="A video showing the multiple measurement functionality" /> | ||
</div> | ||
{{else if (eq @slideNumber 7)}} | ||
<div class="slide"> | ||
<p><strong>New links</strong> to sites related to the selected tax lot</p> | ||
<img src="/img/slideshow/relevant-links.gif" alt="A video showing the relevant links functionality" /> | ||
</div> | ||
{{/if}} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we remove these 3 commented lines now? I'd rather they not land in develop
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've removed them, although I don't really understand why. They make it easy for any developer in the future to switch between showing the modal once, showing the modal until the user hits the checkbox, or always showing the modal. What's the drawback?