question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add pop-out button for grid mode and store defaults in settings

See original GitHub issue

🚀 Feature

This would supersede #3007 and #2974 by adding a pop out to the grid button, accessible by right clicking it that would allow the user to set the grid size as a 2-tuple of int (could be two int comboboxes > 0) and the stride could be a int combobox that could be negative or positive (0 should result in no grid). It should look like the pop out dialog for the play button

Screen Shot 2021-07-09 at 8 40 14 AM

Clicking the button normally should toggle between grid enabled/ disabled.

The default values of size, stride, and enabled should also be stored in the settings. Changing the values in the popout shouldn’t change defaults (like is done with the play button) but changing values in settings should change values in popout.

How does this sound @haesleinhuepf @tlambert03? If agreed on this behaviour we can give to @ppwadhwa for the next sprint.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:15 (15 by maintainers)

github_iconTop GitHub Comments

2reactions
sofroniewncommented, Jul 15, 2021

Thanks so much for this @liaprins-czi! Great to see it mocked out and I love the little help icon in image

Definitely something we might want to use more of!

I’m thinking that we might want to go with Grid stride, Grid height, and Grid width as the three options. I find shape height and shape width a little funny as its not really the height of the shape, it was more the shape of the grid which has a height and width.

Also @ppwadhwa is it possible to make a combobox which skips 0 as then we could use a combobox that goes -1, 1, 2, ... for width/ height. And possibly one that goes ... -2, -1, 1, 2, .... for stride. I think having comboboxes for height and width will probably feel better than having free text though as the values are only integers.

For tooltip help we could have the following for stride

Number of layers to place in each grid square before moving on to
        the next square. The default ordering is to place the most visible
        layer in the top left corner of the grid. A negative stride will
        cause the order in which the layers are placed in the grid to be
        reversed.

and the following for height/ width.

        Number of rows and columns in the grid. A value of -1 for either or
        both of will be used the row and column numbers will trigger an
        auto calculation of the necessary grid shape to appropriately fill
        all the layers at the appropriate stride.

Also, what should the default stride be first time user opens the grid mode popout?

The defaults are -1, -1 for width / height and 1 for stride, see

https://github.com/napari/napari/blob/a8e618a742ef915ea3638a61592981fb17b2bd7f/napari/components/grid.py#L33-L34

Does this all sound good to @jni? Might be good to get one more look over (I’d also be open to rows/ columns instead of height/ width, but don’t have a strong feeling).

Maybe @liaprins-czi you can look over my suggestions above and if you agree can make an update mock that @ppwadhwa can then build against. Also happy to discuss more if you disagree with any. Thanks!!

1reaction
ppwadhwacommented, Jul 15, 2021

Thanks, @liaprins-czi and @sofroniewn. I’m going to start putting this in place! 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

PopUp Editing - Blazor Grid - Documentation
Popup editing lets the user click an Edit command button on the row, and a popup shows up with all its editable columns...
Read more >
Add new button in kendo grid edit popup mode - Stack Overflow
1 Answer 1 ... Define in your columns definition an editor function that generates both elements (the checkbox as it is being added...
Read more >
Core/widget/Popup | Bryntum Grid
Popup A floating Popup widget, which can contain child widgets or plain html. ... A config object containing default settings to apply to...
Read more >
Creating Popups in AG Grid
Learn how to create an interactive menu component as a popup that is triggered on a button click in AG Grid. See the...
Read more >
Popup Menus | WinForms Controls | DevExpress Documentation
#Show a Custom Popup Menu for Any Grid Element ... You can create and show a custom context menu within a View's BaseView.MouseDown...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found