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

Added group item #3898

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Added group item #3898

wants to merge 2 commits into from

Conversation

vallsv
Copy link
Contributor

@vallsv vallsv commented Jun 30, 2023

This PR feature a Group plot item together with an example.

It is an intermediate implementation which doesn't stores the item as a tree representation, but instead still use the flat representation. In the other word, a group have no special meaning for a plot.

The link between a group and another item is just a relationship between 2 plot items.

This anyway allow to group items together.

  • A group added/removed from a plot will update the plot with its childrens
  • The visibility of the group will impact the visibility of the children

There is improvement that could be optionally tested:

  • Expose the relationshit in the 2 directions (create a Item.getParentItem())
  • Handle the bouding box as a tree
  • Handle the visibility as a tree

Changelog:

  • Added a Group plot item

@vallsv vallsv added this to the 2.0.0 milestone Jun 30, 2023
@vallsv vallsv requested a review from t20100 June 30, 2023 09:26
@vallsv vallsv assigned vallsv and unassigned t20100 Jun 30, 2023
@t20100
Copy link
Member

t20100 commented Jul 12, 2023

Adding a Group item while keeping the flat structure is not a good move IMO.

If the flat structure is maintained, the Group should not be an item of the plot, but more an object that allows to handle a couple of items (like changing visibility/adding-removing from plot) at once like matplotlib has Container to group Artists. That would be the intermediate step for me.

If Group is a plot item, then we need a proper tree structure of items.

@vallsv
Copy link
Contributor Author

vallsv commented Jul 12, 2023

A group which is not a plot item is pointless to me.
Because anybody can already create such structure, but will still have to manage the life cycle of the children on it's own.

I would prefer not to create another extra layer of indirection in Flint. Because that's stuff which will never be shared back to silx.

@vallsv vallsv modified the milestones: 2.0.0, Next release Sep 8, 2023
@t20100 t20100 removed this from the Next release milestone Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants