#Improvement of panel management required.

37 messages · Page 1 of 1 (latest)

frail patrol
#

Right now, every widget in a block requires it's own panel design, and panel code, etc etc...
This makes the app break the DRY principle, and is extremely unproductive.
Every change or development in the app requires the change of multiple panels, which can occumulate quite badly.

We should be able to design panels, and apply them to the widgets we like.
This way we can have 20 widgets working with 3 panels for example.

Btw, this problem also occurs with Props, altho the effect is less drastic.

keen pilot
#

You can use default panels from Blocks which you don't need to customize, that's there.

#

In practice, I doubt that you'd be able to reuse 3 panels for 20 working widgets with no customisation

#
#

I wouldn't use it though, most of the work is on the widget for a blocks app, it would not be the best idea to not have a good experience on the settings part

frail patrol
keen pilot
#

Maybe look at a multi-state

frail patrol
#

Interesting

frail patrol
#

Might not work in the editor

frail patrol
#

so far all code i tried to run in the editor failed to run, so multistatebox is a probabe no go

keen pilot
#

It works... you can create multiple widgets / designs under the same blocks widget, every widget as a state in the multi-state. You add the template selection in settings panel. On load you check the current selection and switch to that state.

#

The multi-state shouldn't be selectable in the Editor, you handle all state switching using code from the custom settings panel

frail patrol
#

This won't do, the user should see the template,and also edit it to their liking, connect to data, and more.
I need a potential to have 50 templates for example. All editable and able to connect data.

keen pilot
#

"This won't do, the user should see the template,and also edit it to their liking" --> Should work... I don't know about connecting it to the data directly without code, but I don't see a problem.

frail patrol
keen pilot
#

You can, using code

#

Anyway, we're using this in a lot of apps, maybe you want to re-try

frail patrol
#

I think I can use a dashboard page as a panel, for settings etc...
Can we still only have one dashboard page?
There I can use a multistate though

short ibex
#

@frail patrol There shouldn't be a limit on dashboard pages

frail patrol
frail patrol
#

@keen pilot
How do you determine which state is shown in each design preset?
When I change stat order it changes all my states.

#

Oh I see you asnwered this already, though the panel.
So you can then use a single panel to adjust the props in the different widgets theoratically? (or practically for you maybe)

#

Honestly I would rather those widgets not have props.
So I only have a single set of props.
need to see if i can access the #IDS on the inner widgets tho

#

or i'll have props revealing the #IDs I need in them, for the main widget to use 🤔

frail patrol
#

@short ibex I am trying this idea to hold many inner widgets in a multistatebox.
So far everything I tested works except one thing.
I can't recognize with code which Widget is inside a state.

Is there any way to find the id of a child that is a widget?
Or any miraculous way to make this available?
$w('#multistatebox').currentState.children[0] returns an empty object

Only workaround I can currently see if maintaining a manual list of state & widget child

short ibex
#
frail patrol
frail patrol
#

@short ibex
By the way,
Nested widgets elements (like repeater slider) do not scroll on Wix-Editor (they do scroll in studio).
This makes for very tricky editing of repeater items (or warrants use of CMS).

short ibex
#

I believe the widget's ID should appear in the editor when you click on it >>

short ibex
frail patrol
# short ibex I believe the widget's ID should appear in the editor when you click on it >>

Yeah, i know.
Please note I am saying you can't get the ID - Programmatically.
As a work-around for panel not being a reproducable element, I am using a single widget with many nested widgets representing design templates.
Each nested widget is kept inside a multi-statebox state container.
When a user changes state, I need to know which widget is inside the selected state.
I can't get this id in the regular programmatic way $w('#multistatebox').currentState.children[0].id

My current workaround for this is maintaining a manually sustainable object pairing states with nested widgets

const stateToWidget = {
    Baseline: $w('#70SSlider1'),
    LogoList: $w('#clientLogos1'),
    Three: $w('#threePlus1'),
}
short ibex
frail patrol
#

Sure thing, but I have to go out now for some errands so i'll only be able to do this later on.
Do you guys work on Sukkot/Hol Hamoed?
Just trying to estimate when to expect an answer.
I'm trying to get the app's new major version ready before the holiday sale.

short ibex
#

We work at limited capacity 😬

But ping me here with the ticket # and I'll push it

frail patrol
#

great thanks

frail patrol
#

ticket submitted

frail patrol