Git Product home page Git Product logo

Comments (7)

yoavaa avatar yoavaa commented on August 15, 2024

No plan so far - don't understand the product (what keys to use, what part of the tree can gain focus, etc.). Is it not a problem of the label templates to have focusable areas and implement keyboard navigation using the APIs (binding of expandedNodes and selectedNode)?

from angular-tree-control.

waynebloss avatar waynebloss commented on August 15, 2024

I'm looking for robust, enterprise level, desktop style keyboard support so that I can make my applications accessible. It is rare that web components can achieve the level of interactivity that come with native controls because it is so difficult. So, I don't blame you if you're not planning on it :)

Some of the features I look for are:

  • Expand with Right-arrow, contract with Left-arrow, select with Spacebar or Enter.
  • Up/Down arrow keys move selection to the next node above or below.
  • Select/highlight the matching node as you type.
  • Home (select top root node), End (select last node).
  • F2/someOtherKeyOnOSX to rename selected node.
  • When the tree control receives focus as the result of tabbing, focus on the previously selected node.
  • Page-Up/Page-Down selects the node at the bottom of the viewport and scrolls any nodes beneath it into view.
  • Tab should move focus onto or off of the tree, not navigate between nodes.

from angular-tree-control.

ajcastro avatar ajcastro commented on August 15, 2024

^ Those feature request is awesome and I also need that. Heheh.

from angular-tree-control.

seiyria avatar seiyria commented on August 15, 2024

I don't think selecting / highlighting a node is something that should be done with a keyboard control. You should use an external select box for that (ui-select or others) and have that do the legwork.

from angular-tree-control.

seiyria avatar seiyria commented on August 15, 2024

hey @waynebloss and @ajcastro -

in my PR #78, I've started work on an external API that can be used to programmatically control the tree. Given that people probably have opinions of what hotkey library to use, and such - I don't feel it makes sense to bundle a separate module with this one, when people may want to use their own. Plus, this would allow people to bind any hotkey they want to whatever functions they want.

All that I've made so far is:

  • selectFirst
  • selectNext
  • selectPrev
  • selectLast
  • expand
  • collapse

At one point I had entertained doing everything possible with this library but I felt there would be way too much work, and honestly I just needed to get something working for now. It's not so bad to add new functions, I think, with the initial support being there.

I've also noticed that the original maintainers seem to be absent (the earliest PR was from a long time ago and hasn't been merged yet), so I'll be putting my version up on bower probably today.

from angular-tree-control.

waynebloss avatar waynebloss commented on August 15, 2024

Thank you @seiyria, I will take a look.

from angular-tree-control.

uguryilmaz avatar uguryilmaz commented on August 15, 2024

@waynebloss did you succeed implementing keyboard navigation on tree control?

from angular-tree-control.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.