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

Implement VerticalList widget #607

Open
PoignardAzur opened this issue Sep 23, 2024 · 4 comments
Open

Implement VerticalList widget #607

PoignardAzur opened this issue Sep 23, 2024 · 4 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed masonry Issues relating to the Masonry widget layer

Comments

@PoignardAzur
Copy link
Contributor

Currently, people who want to create a new container widget look at the Flex widget for inspiration. That implementation is fairly complex, and not a great introduction for newcomers.

We should implement a container widget with a little code as possible. This widget would display its children vertically with a fixed amount of free space between them. It would have no customization parameters aside from that spacing constant. Its implementation would serve as a guide for people implementing custom widgets.

There should be non-doc comments in other widget files pointing newcomers to the VerticalList implementation.

To make sure the implementation doesn't bit-rot, we should:

  • Include unit tests and screenshot tests.
  • Use VerticalList in at least one example (probably to_do_list).
  • Have a vertical list element is Xilem as well.
@PoignardAzur PoignardAzur added good first issue Good for newcomers help wanted Extra attention is needed masonry Issues relating to the Masonry widget layer labels Sep 23, 2024
@DJMcNab
Copy link
Member

DJMcNab commented Sep 23, 2024

What is the use-case for this widget outside of this demonstration?

That is, could this instead be a masonry example? (examples can have tests, if they have test = true set on them)

@PoignardAzur
Copy link
Contributor Author

I guess it could.

I think having it in the main widget folder would be better for discoverability, though.

@Philipp-M
Copy link
Contributor

Yeah my first thought was also, that this may just be an example for masonry and possibly xilem as well, like a custom widget with children.

I think having it in the main widget folder would be better for discoverability, though.

I think regarding this, we should probably just start with proper (high-level) documentation.

@jaredoconnell
Copy link
Contributor

This was partially my intention with the grid widget. I kept it as simple as possible so that it can be used as an example widget for layouts. It's literally a quarter the size of the Flex widget, and I added more documentation.

If you want to add a VerticalList widget, I think VerticalStack may be a more appropriate name. It helps differentiate it from the VirtualList, clarifying that you need to put it in a portal for scrolling, as it just stacks things vertically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed masonry Issues relating to the Masonry widget layer
Projects
None yet
Development

No branches or pull requests

4 participants