-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Improved Period Selection and Usability Enhancements (#3407)
feat: Improved Period Selection and Usability Enhancements Thematic Layers The Period tab has been completely redesigned to improve flexibility and clarity: * It now uses the same period selector as other analytics apps, allowing selection of multiple periods and support for non-Gregorian calendars (#DHIS2-15796). * Mapping options (Single, Timeline, or Split Map) are now more clearly displayed with icons and improved information messages. * All mapping options now support multiple periods selections, including mixed selections of different period types, fixed and/or relative presets (#DHIS2-16358). * Start and End Date inputs use the new standard calendar (currently limited to accepting dates converted to the Gregorian calendar) which supports translation and improves keyboard entry. * When switching between Presets and Start-end dates, the previous selection is restored (#DHIS2-18722). Event & Tracked Entity Layers In the Period tab, the new standard calendar is also used for start and end date selection. Other Usability Enhancements * Users can now select their organisation unit in combination with other organisation units across all layer types (#DHIS2-18066). * New keyboard shortcuts are available: * Tab / Shift+Tab to switch back and forth between start and end date inputs. * Press Esc to close dialogs (layer add/edit, download mode, layer sources management...) and popups in the map. * Long-press Esc to close sidebars (interpretations, organisation unit profile) and the data table. * Dialogs (layer add/edit and layer sources management) now feature an "x" button for easier closing. * The timeline now resizes dynamically when the window size changes or sidebars are opened/closed.
- Loading branch information
1 parent
1afa064
commit 412a3ad
Showing
86 changed files
with
4,059 additions
and
817 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
File renamed without changes.
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,81 @@ | ||
import { EXTENDED_TIMEOUT } from '../support/util.js' | ||
|
||
const map = { | ||
id: 'eDlFx0jTtV9', | ||
cardTitle: 'ANC LLITN coverage', | ||
} | ||
|
||
const alt = { | ||
group: 'HIV', | ||
name: 'VCCT post-test counselling rate', | ||
} | ||
|
||
describe('keyboard navigation', () => { | ||
it('tab', () => { | ||
cy.visit('/') | ||
|
||
// StartEndDate | ||
cy.getByDataTest('add-layer-button').click() | ||
|
||
cy.get(`[data-test="addlayeritem-thematic"]`).click() | ||
cy.getByDataTest('layeredit').should('be.visible') | ||
|
||
cy.getByDataTest('dhis2-uicore-tabbar-tabs') | ||
.find('button') | ||
.contains('Period') | ||
.click() | ||
cy.contains('Define start - end dates').click() | ||
cy.getByDataTest('calendar-clear-button').eq(0).click() | ||
cy.getByDataTest('start-date-input-content').find('input').type('123') | ||
cy.getByDataTest('calendar').should('be.visible') | ||
cy.realPress('Tab') | ||
cy.getByDataTest('calendar').should('not.exist') | ||
cy.realPress('Tab') | ||
cy.getByDataTest('calendar').should('be.visible') | ||
cy.realPress('Tab') | ||
cy.getByDataTest('calendar').should('not.exist') | ||
}) | ||
it('esc', () => { | ||
cy.visit(`/#/${map.id}`, EXTENDED_TIMEOUT) | ||
cy.get('canvas', EXTENDED_TIMEOUT).should('be.visible') | ||
|
||
// Layer popover | ||
cy.getByDataTest('add-layer-button').click() | ||
cy.getByDataTest('addlayerpopover').should('be.visible') | ||
cy.realPress('Escape') | ||
cy.getByDataTest('addlayerpopover').should('not.exist') | ||
|
||
// Manage layer sources modal | ||
cy.getByDataTest('add-layer-button').click() | ||
cy.getByDataTest('managelayersources-button').click() | ||
cy.getByDataTest('managelayersourcesmodal').should('be.visible') | ||
cy.realPress('Escape') | ||
cy.getByDataTest('managelayersourcesmodal').should('not.exist') | ||
|
||
// Download mode | ||
cy.getByDataTest('dhis2-analytics-hovermenubar') | ||
.find('button') | ||
.contains('Download') | ||
.click() | ||
cy.getByDataTest('download-settings').should('be.visible') | ||
cy.realPress('Escape') | ||
cy.getByDataTest('download-settings').should('not.exist') | ||
|
||
// Layer edit | ||
cy.getByDataTest('layer-edit-button').click() | ||
cy.getByDataTest('layeredit').should('be.visible') | ||
cy.get('[data-test="indicatorgroupselect"]').click() | ||
cy.contains(alt.group).click() | ||
cy.get('[data-test="indicatorselect"]').click() | ||
cy.contains(alt.name).click() | ||
cy.realPress('Escape') | ||
cy.getByDataTest('layeredit').should('not.exist') | ||
cy.getByDataTest('layercard') | ||
.contains(map.cardTitle, { timeout: 50000 }) | ||
.should('be.visible') | ||
|
||
// StartEndDate | ||
cy.getByDataTest('layer-edit-button').click() | ||
cy.getByDataTest('layeredit').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
Oops, something went wrong.