fyne icon indicating copy to clipboard operation
fyne copied to clipboard

RFC: Introduce a new Edge container

Open Jacalz opened this issue 1 year ago • 3 comments

Description:

This new container is a replacement for container.NewBorder but without the footguns. There is a centre item instead of a slice of objects that act like a Stack container. The centre item can optionally be nil also.

Checklist:

  • [x] Tests included.
  • [x] Lint and formatter run with no errors.
  • [x] Tests all pass.

Where applicable:

  • [x] Public APIs match existing style and have Since: line.
  • [ ] Any breaking changes have a deprecation path or have been discussed.

Jacalz avatar Apr 30 '24 19:04 Jacalz

This uses the layout.NewEdge name which stutters less than layout.NewEdgeLayout but is less similar to the other layouts. Should we rename (I.e. create new functions and deprecate the old ones) with better naming?

Jacalz avatar Apr 30 '24 20:04 Jacalz

Coverage Status

coverage: 65.017% (+0.04%) from 64.975% when pulling 418cfb35ad0cd67d7c4f723b7f289976be011cc6 on Jacalz:edge-container into 56342a2b034a5772d6c27d2a23facd6c43cfa6a0 on fyne-io:develop.

coveralls avatar Apr 30 '24 20:04 coveralls

Hmm, if we think that having no 5th parameter for border we could potentially move it from 4 to 5 parameters and the optional becomes 6 onwards in case people did use the ability to have more than a single item in the centre.

I'm not totally sure it's worth a new layout (and new container?) to fix this one issue.

andydotxyz avatar May 02 '24 14:05 andydotxyz

yeah, probably not

Jacalz avatar May 18 '24 12:05 Jacalz