Skip to content
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

feat(organisation-unit-tree): introduce v2 #1178

Open
wants to merge 42 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
a3596d7
feat: organisation unit tree v2
HendrikThePendric Sep 28, 2022
fbf4da0
chore(deps): add i18n dependency
HendrikThePendric Mar 27, 2023
5ed1199
fix: address circular dependency issue
HendrikThePendric Mar 27, 2023
cf49373
chore: upgrade deps
HendrikThePendric Mar 27, 2023
cf1264d
chore: allow remotely testing the storybook
HendrikThePendric Mar 28, 2023
d407124
feat: correctly implement load all siblings
HendrikThePendric Mar 28, 2023
1aa924f
feat: add style for node error and toggler hover
HendrikThePendric Mar 29, 2023
5627455
chore: remove debug condition
HendrikThePendric Mar 29, 2023
9b9f100
chore: add line break for readability
HendrikThePendric Mar 29, 2023
9423c39
fix: refresh node label and children when closing node
HendrikThePendric Mar 29, 2023
29c7d60
feat: mutually exclusive text highlighting
HendrikThePendric Mar 29, 2023
ffab6dd
feat: allow showing and hiding filtered siblings
HendrikThePendric Mar 29, 2023
f7a1465
feat: show level type in sibling toggler
HendrikThePendric Mar 29, 2023
b6197bb
refactor: use consisten style in managers
HendrikThePendric Mar 30, 2023
94726c1
fix: ensure trailing spaces are not collapsed in text highlights
HendrikThePendric Mar 30, 2023
2ad9d61
fix: ensure all chevrons switch to open state
HendrikThePendric Mar 30, 2023
dd57d4d
fix: ensure sibling toggler stays visiable while loading
HendrikThePendric Mar 30, 2023
66e8597
fix: extract node error component and ensure all components are exported
HendrikThePendric Mar 30, 2023
de7f65e
fix: prevent toggling children while loading
HendrikThePendric Mar 30, 2023
4845a08
fix: switch to white-space pre-wrap because this hangs trailing spaces
HendrikThePendric Apr 3, 2023
f886340
feat: allow navigation within search results
HendrikThePendric Apr 3, 2023
d26d9a8
fix: ensure opened item children are loaded
HendrikThePendric Apr 4, 2023
6a5ead2
fix: adjust filtering example and implementation to allow search reset
HendrikThePendric Apr 4, 2023
0a2eb71
feat: allow opening by clicking on label and improve disabled styles
HendrikThePendric Apr 4, 2023
79a0cca
feat: introduce private fields in the node class to define a public api
HendrikThePendric Apr 5, 2023
1db28ca
feat: don't show cursor pointer for passive nodes
HendrikThePendric Apr 5, 2023
7c833b0
chore: only show cursor pointer if a node can be opened
HendrikThePendric Apr 5, 2023
e1f37fe
feat: call onChange when a node is selected with payload and event
HendrikThePendric Apr 5, 2023
4f0e3d2
fix: allow opening disabled nodes
HendrikThePendric Apr 5, 2023
a9f1e7e
fix: ensure listeners unsubscribe when components unmount
HendrikThePendric Apr 5, 2023
48987ec
Merge branch 'feat/org-unit-tree-v2' of github.com:dhis2/ui into feat…
HendrikThePendric Apr 5, 2023
e46463f
fix: clean up manager public api
HendrikThePendric Apr 5, 2023
8e21652
chore: remove stray text
HendrikThePendric Apr 6, 2023
ab4d8de
feat: allow customising the manager and the node-manager
HendrikThePendric Apr 11, 2023
feed911
fix: set default values for calling create manager directly
HendrikThePendric Apr 11, 2023
79d13f7
docs: add developer documentation
HendrikThePendric Apr 11, 2023
0992d16
fix: multi selection onchange payload
HendrikThePendric Apr 12, 2023
327feb4
fix: children error
HendrikThePendric Apr 12, 2023
be0c718
fix: prevent full rerender if consumer creates new onChange every render
HendrikThePendric Apr 12, 2023
314f101
feat: add selected descendants count tag
HendrikThePendric Apr 13, 2023
04370fb
chore: fix formatting
HendrikThePendric Apr 13, 2023
757bee4
feat: improve single selection mode UI and UX
HendrikThePendric Apr 13, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: address circular dependency issue
  • Loading branch information
HendrikThePendric committed Mar 27, 2023
commit 5ed119909427008be81ec2810e6d5a954d2becec
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import { ManagedOrganisationUnitTree } from './managed-organisation-unit-tree.js'
export { OrganisationUnitTreeProvider } from './organisation-unit-tree-provider.js'

export { OrganisationUnitNodeChildren } from './organisation-unit-node-children.js'
export * from './organisation-unit-node-label/index.js'
export { OrganisationUnitNode } from './organisation-unit-node.js'
export {
// TODO: export as `* from` once V2 suffix is removed from tree component
OrganisationUnitRootContainer,
OrganisationUnitRootError,
OrganisationUnitRootFetcher,
OrganisationUnitRootLoader,
OrganisationUnitRootNodes,
OrganisationUnitTree as OrganisationUnitTreeV2,
} from './organisation-unit-tree/index.js'
export { OrganisationUnitTreeProvider } from './organisation-unit-tree-provider.js'
export { ManagedOrganisationUnitTree as OrganisationUnitTreeV2 }
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from 'react'
import { OrganisationUnitTreeProvider } from './organisation-unit-tree-provider.js'
import { OrganisationUnitTree } from './organisation-unit-tree/index.js'

const ManagedOrganisationUnitTree = (props) => (
<OrganisationUnitTreeProvider>
<OrganisationUnitTree {...props} />
</OrganisationUnitTreeProvider>
)

export { ManagedOrganisationUnitTree }
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {
useOrganisationUnitTree,
useOrganisationUnitTreeComponents,
} from '../../hooks/index.js'
import { OrganisationUnitTreeProvider } from '../organisation-unit-tree-provider.js'

const OrganisationUnitTree = ({
disabledIds,
Expand Down Expand Up @@ -59,12 +58,6 @@ const OrganisationUnitTree = ({
)
}

const ManagedOrganisationUnitTree = (props) => (
<OrganisationUnitTreeProvider>
<OrganisationUnitTree {...props} />
</OrganisationUnitTreeProvider>
)

OrganisationUnitTree.propTypes = {
rootIds: PropTypes.arrayOf(orgUnitIdPropType).isRequired,
onChange: PropTypes.func.isRequired,
Expand All @@ -76,4 +69,4 @@ OrganisationUnitTree.propTypes = {
singleSelection: PropTypes.bool,
}

export { ManagedOrganisationUnitTree as OrganisationUnitTree }
export { OrganisationUnitTree }