Dyalog / ewc-client

Other
1 stars 4 forks source link

divs created for RibbonButton / RibbonButtonGroup should be given the ids that were passed to eWC #157

Closed mbaas2 closed 3 months ago

mbaas2 commented 7 months ago

I can probably work around this for testing - but if we ever wanted to test really complex forms it may not be possible to find controls reliably without being able to use ids. It's clear that a single UI element may contain several html tags - but I imagine we could deal with that if just the outer div had a matching id.

This tends to become my favorite issue - but I think there's no need to repeat myself for every new control - so I will not create additional issues with repetitions of this content😉 If there's a debate to be had about it, we can have it here etc.

NB: this was logged against the current version of the grid/cell-move branch.

PS: if ⍺ ever becomes optional in dWC, there should be mechanism to generate a "default id"

mbaas2 commented 7 months ago

@mkromberg said this should be fixed in branch "refactor/grid" - but when I tested DemoRibbon today (70904bd5685bfb3000d9132770d88c853bf7fb3e) I couldn't find the text .Ribbon in the html as DemoRibbon.aplfextensively created various objects with ids that contained this string:

'F1.Ribbon.Item1' eWC 'RibbonGroup' 'Locks'
'F1.Ribbon.Item1.GroupItem1' eWC 'RibbonGroupItem' 12
 'F1.Ribbon.Item1.GroupItem1.LockButton' eWC 'RibbonButton' 'Access' 'FcLock' 12 sel

BTW, as an additional example, also the id of this TreeView control wasn't in the html:

 'F1.Months'eWC'TreeView'('Q1' 'Jan' 'Feb' 'Mar' 'Q2' 'Apr' 'May' 'Jun')(210 500)(150 200)('Depth'(8⍴0 1 1 1))
mqasim23 commented 7 months ago

I have pushed the fixed the fix for this issue. Please pull and verify @mbaas2

mbaas2 commented 7 months ago

Let me quote myself:

This tends to become my favorite issue - but I think there's no need to repeat myself for every new control - so I will not create additional issues with repetitions of this content😉 If there's a debate to be had about it, we can have it here etc.

RibbonGroup, RibbonGroupItem and RibbonButton are fine now - TreeView (that I also mentioned in my last reply) is still "idless".

mbaas2 commented 7 months ago

@mqasim23 I briefly had a look at DemoRotate (in the refactors/grid branch): the rotated text elements that are created also do not have an id!

As I said in my initial post: "This tends to become my favorite issue - but I think there's no need to repeat myself for every new control - so I will not create additional issues with repetitions of this content" Or would you prefer separate issues per element?

mbaas2 commented 6 months ago

Also the Text objects created in the "TextSize" demo (in refactor/grid) have no ids.

mbaas2 commented 5 months ago

Acually - creating separate issues has the advantage can they can be closed when the one element that's being discussed is being dealt with - so I'll change my approach😉

mbaas2 commented 3 months ago

ids looking good now