Skip to content
New issue

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

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

Already on GitHub? # to your account

feat: ComponentKey API #2566

Merged
merged 13 commits into from
Jun 20, 2023
Merged

feat: ComponentKey API #2566

merged 13 commits into from
Jun 20, 2023

Conversation

erickzanardo
Copy link
Member

@erickzanardo erickzanardo commented Jun 7, 2023

Description

This PR adds a new key api on FCS, which will allow users to get a component from the tree, without needing to iterate over all the children or a parent descendants.

Checklist

  • I have followed the Contributor Guide when preparing my PR.
  • I have updated/added tests for ALL new/updated/fixed functionality.
  • I have updated/added relevant documentation in docs and added dartdoc comments with ///.
  • I have updated/added relevant examples in examples or docs.

Breaking Change?

  • Yes, this PR is a breaking change.
  • No, this PR is not a breaking change.

Related Issues

@erickzanardo erickzanardo marked this pull request as draft June 7, 2023 16:54
@erickzanardo erickzanardo marked this pull request as ready for review June 13, 2023 12:46
@erickzanardo erickzanardo requested a review from spydon June 13, 2023 12:46
Copy link
Member

@spydon spydon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm, maybe just add a specific example for the keys?

@erickzanardo
Copy link
Member Author

Lgtm, maybe just add a specific example for the keys?

I considered that, but I felt that this example wouldn't show anything much visual, so I went with changing an existent example to make use of the new API.

Do you feel we needed to have a dedicated example only for the key api? and if so, any idea how that example would look like?

erickzanardo and others added 2 commits June 13, 2023 10:05
Co-authored-by: Lukas Klingsbo <me@lukas.fyi>
Co-authored-by: Lukas Klingsbo <me@lukas.fyi>
@spydon
Copy link
Member

spydon commented Jun 13, 2023

I considered that, but I felt that this example wouldn't show anything much visual, so I went with changing an existent example to make use of the new API.

Do you feel we needed to have a dedicated example only for the key api? and if so, any idea how that example would look like?

It would be hard for a user to find out that the key api example is on the keyboard example.
A little bit hard to visualize the feature, but maybe one could show the components key id on top of some simple components and click on some buttons that are on some other place on the screen that looks up the component in the tree and adds some simple effect on it?

@erickzanardo
Copy link
Member Author

@spydon added a more specific example, let me know what you think

Screen.Recording.2023-06-20.at.08.57.00.mov

@spydon
Copy link
Member

spydon commented Jun 20, 2023

@spydon added a more specific example, let me know what you think

Screen.Recording.2023-06-20.at.08.57.00.mov

Cute! Love it, and it should be clear what is happening too 😊

@erickzanardo erickzanardo merged commit b3efb61 into main Jun 20, 2023
@erickzanardo erickzanardo deleted the feat/key-api branch June 20, 2023 12:36
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants