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

Make bhima's Tree Navigation awesome #44

Closed
2 of 4 tasks
jniles opened this issue Jan 27, 2016 · 4 comments
Closed
2 of 4 tasks

Make bhima's Tree Navigation awesome #44

jniles opened this issue Jan 27, 2016 · 4 comments

Comments

@jniles
Copy link
Contributor

jniles commented Jan 27, 2016

A huge refactor of the CSS + logic powering bhima's Tree Navigation component just landed (#42). The tree is functional and re-skinned for 2.X standards. This issue is to track new features we might want to add to the navigation either for bhima 2.X or beyond. If a PR lands with any of these features, feel free to link them and tick the checkbox.

  • Page refresh should preserve the current highlighted tree module.
  • The navigation should match the base URL in the cases when $routeParams are present. (e.g. '/patients/:uuid?' should be matched in all the following cases: '/patients', 'patients/', 'patients/1324').
  • [:small_red_triangle_down: Low Priority] Colour coded routes showing category (this will happen one day) - for example:
  • Hospital - Blue
  • Finance - Orange
  • Inventory - Yellow
  • Stock - Green
  • Reports - Purple
  • End to End tests for all tree functionality
  • demonstrate that pages are remembered in the browsers cache.
  • demonstrate that the sort order is alphabetical on free nodes
  • demonstrate successful logout
@sfount
Copy link
Contributor

sfount commented Jan 27, 2016

The second issue can be addressed by simply changing the navigation change watch method - right now it looks for a direct match on a normalised string ('/' removed etc.) navigation.js:62

This could instead iterate through all paths (index in unitsIndex) and do something along the lines of

url.indexOf(unit.path) !== -1; // Supported in all JavaScript versions
url.includes(unit.path); // Beautiful - more recent versions of JavaScript

@jniles
Copy link
Contributor Author

jniles commented Feb 6, 2016

Include in "end to end tests":

  • demonstrate that the tree remembers the collapsed/opened behavior across page refreshes
  • demonstrate the previous tree node is successfully deselected when navigated away to any (even an unknown) link.

@sfount
Copy link
Contributor

sfount commented Feb 6, 2016

(Important UX fix) Collapse the tree on successful log out to make the
login page always present a uniform structure.
On 6 Feb 2016 9:04 a.m., "Jonathan Niles" notifications@github.com wrote:

Include in "end to end tests":

  • demonstrate that the tree remembers the collapsed/opened behavior
    across page refreshes
  • demonstrate the previous tree node is successfully deselected when
    navigated away to any (even an unknown) link.


Reply to this email directly or view it on GitHub
#44 (comment)
.

@jniles
Copy link
Contributor Author

jniles commented Mar 3, 2016

This directive ought to be migrated to a self-contained angular.component(). It's big enough and complex enough to merit the defaults of a component.

jniles referenced this issue in jniles/bhima Mar 8, 2016
This commit migrates the `bhimaNav` directive to a component
architecture.  The navigation component is now called `bhNavigation` and
has been migrated to the `components/` directory.

One additional improvement has been implemented from #44.  The tree now
searches through all paths for a match to the current url on change
using a `String.includes()` to search for matches.  Credit to @sfount
for this suggestion.
jniles referenced this issue in jniles/bhima Mar 9, 2016
This commit migrates the `bhimaNav` directive to a component
architecture.  The navigation component is now called `bhNavigation` and
has been migrated to the `components/` directory.

One additional improvement has been implemented from #44.  The tree now
searches through all paths for a match to the current url on change
using a `String.includes()` to search for matches.  Credit to @sfount
for this suggestion.
jniles referenced this issue in jniles/bhima Mar 10, 2016
This commit migrates the `bhimaNav` directive to a component
architecture.  The navigation component is now called `bhNavigation` and
has been migrated to the `components/` directory.

One additional improvement has been implemented from #44.  The tree now
searches through all paths for a match to the current url on change
using a `String.includes()` to search for matches.  Credit to @sfount
for this suggestion.
jniles referenced this issue in jniles/bhima Mar 11, 2016
This commit migrates the `bhimaNav` directive to a component
architecture.  The navigation component is now called `bhNavigation` and
has been migrated to the `components/` directory.

One additional improvement has been implemented from #44.  The tree now
searches through all paths for a match to the current url on change
using a `String.includes()` to search for matches.  Credit to @sfount
for this suggestion.
jniles referenced this issue in jniles/bhima Sep 16, 2016
This commit refactors the tree to include test hooks (`data-unit-key`)
and modifies the icons to have better contrast between folders and
files.

Bug fix: the navigation remembers the selected module and re-selects it
on `$stateChangeSuccess`.

Finally, test files have been added for (skipped) protractor tests to ensure
that the tree keeps working as expected.

Closes #44.
jniles referenced this issue in jniles/bhima Sep 16, 2016
This commit refactors the tree to include test hooks (`data-unit-key`)
and modifies the icons to have better contrast between folders and
files.

Bug fix: the navigation remembers the selected module and re-selects it
on `$stateChangeSuccess`.

Finally, test files have been added for (skipped) protractor tests to ensure
that the tree keeps working as expected.

Closes #44.
@jniles jniles closed this as completed in d6e7f5e Sep 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants