Coder Social home page Coder Social logo

Comments (11)

mattpap avatar mattpap commented on July 18, 2024

Attempt to use the tool by double-clicking to set an initial vertex.

In bokeh 3.4 we had to replace double tap gesture with press gesture in edit tools and others, due to changes in UI gesture recognition. Press on the canvas to add the first vertex, then tap to added subsequent vertices and press again to finalize drawing.

from bokeh.

angelsen avatar angelsen commented on July 18, 2024

When i try the latest example poly_draw.html i'm not able to add new patches or multi-lines by press(single tap?). I get the same unexpected behaviour if i run the example locally.

$ bokeh info
Python version        :  3.11.8 (main, Feb 12 2024, 14:50:05) [GCC 13.2.1 20230801]
IPython version       :  (not installed)
Tornado version       :  6.4
Bokeh version         :  3.4.1
BokehJS static path   :  /home/fredrik/Documents/git/bokeh/bokeh_server/myapp_one/.venv/lib/python3.11/site-packages/bokeh/server/static
node.js version       :  v21.7.3
npm version           :  10.5.2
jupyter_bokeh version :  (not installed)
Operating system      :  Linux-6.8.7-arch1-1-x86_64-with-glibc2.39

from bokeh.

bryevdv avatar bryevdv commented on July 18, 2024

@angelsen the first tap has to be a "long" press, I don't think this docs are clear on this point.

The UX is also presently lacking significantly in that there is no indication that the tool has been activated after the long press, or even after the second tap. Nothing shows up at all until a third vertex is dropped, which makes it very hard to judge what the tool is doing. cc @philippjfr

from bokeh.

philippjfr avatar philippjfr commented on July 18, 2024

I'd have to look at this again in more detail and am away from my computer at least until Tuesday but iirc @mattpap made some significant changes to the UX of the draw/edit tools that may not have been documented.

from bokeh.

bryevdv avatar bryevdv commented on July 18, 2024

Regardless of the documentation, the current UX is fairly impossible to navigate out of the box. There are no visual cues that anything at all is happening at all, until after a long press and two taps happen. It's very easy to imagine why users thinks it is just not working.

from bokeh.

philippjfr avatar philippjfr commented on July 18, 2024

Yes, it's pretty clear this needs another in-depth look. I'm out of office until tomorrow, in the meantime @mattpap could you summarize what was changed here an why.

from bokeh.

mattpap avatar mattpap commented on July 18, 2024

The only recent and intentional change to edit/draw tools was replacement of double tap gesture with press tap. It was documented, but perhaps it wasn't advertised sufficiently. However, I myself have a problem with understanding whether the relevant tools actually work or not, at least without consulting documentation and source code. We previously discussed the possibility of redesigning those tools, but nothing came to fruition yet.

from bokeh.

angelsen avatar angelsen commented on July 18, 2024

I believe it would be beneficial for users if the documentation included a dedicated section explaining the different gesture interactions required for tools in Bokeh. If such documentation already exists, it would be helpful to have it linked directly within the sections where these tools are described or discussed.

from bokeh.

bryevdv avatar bryevdv commented on July 18, 2024

@angelsen can you be more specific with your suggestion, e.g. what exact pages you have in mind? Currently there is an entire user guide chapter dedicated to tools:

https://docs.bokeh.org/en/latest/docs/user_guide/interaction/tools.html

with a subsection for edit tools, where all the individual edit tools have their own subsections such as

https://docs.bokeh.org/en/latest/docs/user_guide/interaction/tools.html#boxedittool

each with descriptions like this for their use:

Add box
Hold shift, then click and drag anywhere on the plot or press tap once to start drawing. Move the mouse and press tap again to finish drawing.

Move box
Click and drag an existing box. The box will be dropped once you let go of the mouse button.

Delete box
Tap a box to select it, then press the BACKSPACE key while the mouse is within the plot area.
To Move or Delete multiple boxes at once:

Move selection
Select box(es) with SHIFT+tap (or another selection tool) then drag anywhere on the plot. Selecting and then dragging on a specific box will move both.

Delete selection
Select box(es) with SHIFT+tap (or another selection tool) then press BACKSPACE while the mouse is within the plot area.

from bokeh.

angelsen avatar angelsen commented on July 18, 2024

Press tap differs from tap, press involves a long hold tap. This behavior is perhaps more intuitive on touch devices. However, I believe the documentation would benefit from clearly differentiating Press tap and tap, especially for those using a mouse.

PolySelectTool#

  • name: 'poly_select'

  • icon: poly_select_icon

The polygon selection tool allows you to define an arbitrary polygonal region for selection by left-clicking a mouse, or tapping a finger at different locations.

After a selection is made, the indices of the selected points are available from properties on the Selection object for a glyph data source. For example:

source.selected.indices

will hold the selected indices in the common case of a โ€œscatterโ€ type glyph.

Note

Complete the selection by making press tap on the canvas. To make a multiple selection, press the SHIFT key. To clear the selection, press the ESC key.

E.g., when i read the documentation for PolySelectTool i wouldn't know, now i do, that press tap = long press/click.

Ideally this should be intuniv and a user shouldn't be required to read the documentation, but developers do and could guide a user via tooltips etc.

from bokeh.

bryevdv avatar bryevdv commented on July 18, 2024

So, I think the main priority is to improve the UX so that it is more intuitive, and then in whatever PR does that, update the docs to match. I agree that "press tap" is ambiguous since "press" can can function as different parts of speech in this case and it is not evident which one is intended.

from bokeh.

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.