Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: Introduce a new Edge container #4820

Closed
wants to merge 2 commits into from

Conversation

Jacalz
Copy link
Member

@Jacalz Jacalz commented Apr 30, 2024

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:

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

Where applicable:

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

This new container is a replacement for container.NewBorder but without the footguns. There is a center item instead of a slcie of objects that act like a Stack container. The center item can optionally be nil also.
@Jacalz
Copy link
Member Author

Jacalz commented Apr 30, 2024

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?

@coveralls
Copy link

Coverage Status

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

@Jacalz Jacalz changed the title Introduce a new Edge container RFC: Introduce a new Edge container Apr 30, 2024
@andydotxyz
Copy link
Member

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.

@Jacalz
Copy link
Member Author

Jacalz commented May 18, 2024

yeah, probably not

@Jacalz Jacalz closed this May 18, 2024
@Jacalz Jacalz deleted the edge-container branch May 18, 2024 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants