qooxdoo / qooxdoo

qooxdoo - Universal JavaScript Framework
http://qooxdoo.org
Other
764 stars 259 forks source link

fix bug with tabview button appearances #10657

Closed p9malino26 closed 2 months ago

p9malino26 commented 3 months ago

This PR fixes an issue with appearances in a qx.ui.tabview.TabView, where if the first tab has its tabVisibility set to excluded, the first visible tab will not have the state firstTab, which will break appearance.

johnspackman commented 3 months ago

Why it should move own state to other button

Because it looks weird from the users point of view - if the first tab's visibility is excluded, then it means that the user's "first" tab does not look like the first when the theme's appearance needs to style that "first" tab differently (eg due to borders etc).

When a tab widget has a state like "first", this is only something which is passed to the appearance, it seems reasonable that this state is saying which tab "appears first"

goldim commented 3 months ago

@johnspackman For me first tab is tab which first in array of tabs and not in visible ones. Maybe users' apps are based on old behavior and I may consider this like broken BC, am I right? I would like hear everyone's opinion on this problem. Maybe to create separate discussion?

goldim commented 3 months ago

@p9malino26 In old implementation if I have 3 buttons, removed first and third, central button will have both states. In yours only lastTab.

johnspackman commented 3 months ago

by all means create a separate discussion, or we can carry on here; I guess my point is that the state of "first" is only for the appearance, and if the tab is excluded then the appearance will never see a "first" tab (without this PR), in which case what would be the point of a "first" state.

goldim commented 3 months ago

@johnspackman I can see that it is a bug actually. Classic Theme: image

goldim commented 3 months ago

@p9malino26 just fix what I suggested above and I gonna approve it.