-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: phone landscape scrolling in edit mode was not available (#1594)
Code changes to fix: * Edit controlbar now scrolls away same as View control bar (added overflow-y: auto) * add dashboard-scroll-container class bc progressive loading listens to the scrolling to determine when to load an item. * remove bottom padding on the NoContentMessage since it sometimes caused the content of the scroll container to exceed the container height, forcing a scrollbar even though there was no real scroll content.
- Loading branch information
1 parent
56ad5b5
commit 6bfc650
Showing
16 changed files
with
125 additions
and
22 deletions.
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
42 changes: 42 additions & 0 deletions
42
cypress/integration/ui/responsive_dashboard/phone_landscape.js
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,42 @@ | ||
import { When, Then } from 'cypress-cucumber-preprocessor/steps' | ||
import { | ||
dashboardsBarSel, | ||
outerScrollContainerSel, | ||
editControlBarSel, | ||
} from '../../../selectors/viewDashboard' | ||
|
||
// Scenario: Dashboards bar scrolls away in phone landscape | ||
|
||
When('I go to phone landscape', () => { | ||
cy.viewport(600, 480) | ||
// to account for debounced window resize | ||
cy.wait(100) // eslint-disable-line cypress/no-unnecessary-waiting | ||
}) | ||
|
||
When('I scroll down', () => { | ||
cy.get(outerScrollContainerSel).scrollTo('bottom') | ||
// this item is on the bottom of the Delivery dashboard | ||
cy.contains( | ||
'Births attended by skilled health personnel by orgunit last year' | ||
).should('be.visible') | ||
}) | ||
|
||
Then('the dashboards bar is not visible', () => { | ||
cy.get(dashboardsBarSel).should('not.be.visible') | ||
}) | ||
|
||
When('I scroll to top', () => { | ||
cy.get(outerScrollContainerSel).scrollTo('top') | ||
}) | ||
|
||
Then('the dashboards bar is visible', () => { | ||
cy.get(dashboardsBarSel).should('be.visible') | ||
}) | ||
|
||
Then('the edit control bar is not visible', () => { | ||
cy.get(editControlBarSel).should('not.be.visible') | ||
}) | ||
|
||
Then('the edit control bar is visible', () => { | ||
cy.get(editControlBarSel).should('be.visible') | ||
}) |
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
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
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
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 |
---|---|---|
|
@@ -17,3 +17,9 @@ | |
display: block; | ||
} | ||
} | ||
|
||
@media only screen and (max-height: 480px) { | ||
.container { | ||
overflow-y: auto; | ||
} | ||
} |
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 |
---|---|---|
|
@@ -17,3 +17,9 @@ | |
display: block; | ||
} | ||
} | ||
|
||
@media only screen and (max-height: 480px) { | ||
.container { | ||
overflow-y: auto; | ||
} | ||
} |
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,7 @@ | ||
.container { | ||
padding: var(--spacers-dp48) var(--spacers-dp8) 0 var(--spacers-dp8); | ||
text-align: center; | ||
font-size: 15px; | ||
font-weight: 500; | ||
color: var(--colors-grey600); | ||
} |