Skip to content

Commit

Permalink
Browser Steps - UI - Use a better flexbox layout
Browse files Browse the repository at this point in the history
  • Loading branch information
dgtlmoon committed Sep 18, 2024
1 parent dc936a2 commit c6589ee
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 13 deletions.
22 changes: 18 additions & 4 deletions changedetectionio/static/styles/scss/parts/_browser-steps.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,29 @@
}
}

#browser-steps-fieldlist {
height: 100%;
overflow-y: scroll;
}

#browser-steps .flex-wrapper {
display: flex;
flex-flow: row;
height: 70vh;
font-size: 80%;
#browser-steps-ui {
flex-grow: 1; /* Allow it to grow and fill the available space */
flex-shrink: 1; /* Allow it to shrink if needed */
flex-basis: 0; /* Start with 0 base width so it stretches as much as possible */
background-color: #eee;
border-radius: 5px;

}

#browser-steps-fieldlist {
flex-grow: 0; /* Don't allow it to grow */
flex-shrink: 0; /* Don't allow it to shrink */
flex-basis: auto; /* Base width is determined by the content */
max-width: 400px; /* Set a max width to prevent overflow */
padding-left: 1rem;
overflow-y: scroll;
}
}

/* this is duplicate :( */
Expand Down
29 changes: 22 additions & 7 deletions changedetectionio/static/styles/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,31 @@
#browser_steps li > label {
display: none; }

#browser-steps-fieldlist {
height: 100%;
overflow-y: scroll; }

#browser-steps .flex-wrapper {
display: flex;
flex-flow: row;
height: 70vh; }
height: 70vh;
font-size: 80%; }
#browser-steps .flex-wrapper #browser-steps-ui {
flex-grow: 1;
/* Allow it to grow and fill the available space */
flex-shrink: 1;
/* Allow it to shrink if needed */
flex-basis: 0;
/* Start with 0 base width so it stretches as much as possible */
background-color: #eee;
border-radius: 5px; }
#browser-steps .flex-wrapper #browser-steps-fieldlist {
flex-grow: 0;
/* Don't allow it to grow */
flex-shrink: 0;
/* Don't allow it to shrink */
flex-basis: auto;
/* Base width is determined by the content */
max-width: 400px;
/* Set a max width to prevent overflow */
padding-left: 1rem;
overflow-y: scroll; }

/* this is duplicate :( */
#browsersteps-selector-wrapper {
Expand Down Expand Up @@ -1194,11 +1211,9 @@ ul {
color: #fff;
opacity: 0.7; }


.restock-label svg {
vertical-align: middle; }


#chrome-extension-link {
padding: 9px;
border: 1px solid var(--color-grey-800);
Expand Down
4 changes: 2 additions & 2 deletions changedetectionio/templates/edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@
<div id="loading-status-text" style="display: none;">Please wait, first browser step can take a little time to load..<div class="spinner"></div></div>
<div class="flex-wrapper" >

<div id="browser-steps-ui" class="noselect" style="width: 100%; background-color: #eee; border-radius: 5px;">
<div id="browser-steps-ui" class="noselect">

<div class="noselect" id="browsersteps-selector-wrapper" style="width: 100%">
<span class="loader" >
Expand All @@ -215,7 +215,7 @@ <h2 >Click here to Start</h2>
<canvas class="noselect" id="browsersteps-selector-canvas" style="max-width: 100%; width: 100%;"></canvas>
</div>
</div>
<div id="browser-steps-fieldlist" style="padding-left: 1em; width: 350px; font-size: 80%;" >
<div id="browser-steps-fieldlist" >
<span id="browser-seconds-remaining">Loading</span> <span style="font-size: 80%;"> (<a target=_new href="https://github.com/dgtlmoon/changedetection.io/pull/478/files#diff-1a79d924d1840c485238e66772391268a89c95b781d69091384cf1ea1ac146c9R4">?</a>) </span>
{{ render_field(form.browser_steps) }}
</div>
Expand Down

0 comments on commit c6589ee

Please sign in to comment.