-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes: * in small screen, make dashboard non-interactive when control bar is expanded (DHIS2-10436) * in small screen control bar horizontal scrollbar only shows half height (DHIS2-10417) * control bar now resizes instantly when moving between portrait and landscape (DHIS2-10418) * control bar fixed while dashboard and header bar scroll in phone landscape orientation (DHIS2-10423) Refactor: * remove most height calculations for dashboard and control bar. This includes for the PrintDashboards. Use flexbox and margins instead. * separate control bar drag functionality into a DragHandle component ** Most code in DragHandle hasn't changed from its original form in the deleted ControlBar file * delete ControlBar and move functionality (related to userRows) to DashboardsBar together. Most height calcs removed, and instead css to calculate controlbar height. * Filter component is kind of complex now, as it renders both a Filter for sm (collapsed and expanded) and lg screens (controlled by css display).
- Loading branch information
1 parent
007aa56
commit 84dde66
Showing
67 changed files
with
3,160 additions
and
2,185 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
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,31 @@ | ||
import { When, Then } from 'cypress-cucumber-preprocessor/steps' | ||
import { EXTENDED_TIMEOUT } from '../../../support/utils' | ||
import { | ||
dragHandleSel, | ||
dashboardsBarSel, | ||
} from '../../../selectors/viewDashboard' | ||
|
||
// Scenario: I change the height of the control bar | ||
When('I drag to increase the height of the control bar', () => { | ||
cy.intercept('PUT', '/userDataStore/dashboard/controlBarRows').as('putRows') | ||
cy.get(dragHandleSel, EXTENDED_TIMEOUT) | ||
.trigger('mousedown') | ||
.trigger('mousemove', { clientY: 300 }) | ||
.trigger('mouseup') | ||
|
||
cy.wait('@putRows').its('response.statusCode').should('eq', 201) | ||
}) | ||
|
||
Then('the control bar height should be updated', () => { | ||
cy.visit('/') | ||
cy.get(dashboardsBarSel, EXTENDED_TIMEOUT) | ||
.invoke('height') | ||
.should('eq', 231) | ||
|
||
// restore the original height | ||
cy.get(dragHandleSel) | ||
.trigger('mousedown') | ||
.trigger('mousemove', { clientY: 71 }) | ||
.trigger('mouseup') | ||
cy.wait('@putRows').its('response.statusCode').should('eq', 201) | ||
}) |
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.