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

Add a way to specify the position of child components. #39

Open
sansyrox opened this issue May 12, 2023 · 3 comments
Open

Add a way to specify the position of child components. #39

sansyrox opened this issue May 12, 2023 · 3 comments

Comments

@sansyrox
Copy link
Member

sansyrox commented May 12, 2023

@SuelenKarbivnychyy
Copy link
Contributor

I would like to work on this issue

@sansyrox
Copy link
Member Author

sansyrox commented Jul 6, 2023

In React, you can specify the position of children components!

e.g.


function Parent({children}) {

return (
<div>

Here is the content
{children}
</div>
)
}

Similarly, there is a concept of slots in svelte. However, in Starfyre, we add children at the end of the stack and have no explicit way of specifying the position of children.

For this issue there are 2 steps involved

  1. Research about different ways the different frameworks handle the positioning of children elements
  2. Implement one of the way!

Do let me know if you require any more information from my end!

@sansyrox
Copy link
Member Author

sansyrox commented Jul 6, 2023

Also, please go ahead @SuelenKarbivnychyy 😄

SuelenKarbivnychyy added a commit to SuelenKarbivnychyy/starfyre that referenced this issue Aug 22, 2023
…ated,-Adressed-the-case-if-slot-is-not-specifyed-on-custom-componente-definition.): Developed a way of adding original name when the component is created by adding __pos_init__ method to the component class, this way we improve code maintainability. Adressed the case if slot is not specifyed on custom componente definition

component.py parser.py

BREAKING CHANGE: This closes the issue sparckles#39
SuelenKarbivnychyy added a commit to SuelenKarbivnychyy/starfyre that referenced this issue Aug 23, 2023
delete white spaces, deleted extra inline comment, using is_slot_element property instead of "slot" as string.

sparckles#39
SuelenKarbivnychyy added a commit to SuelenKarbivnychyy/starfyre that referenced this issue Aug 28, 2023
deleted pos_init_ method and assign original_name to every instance of the class on diferent files. Deleted extra comments

sparckles#39
SuelenKarbivnychyy added a commit to SuelenKarbivnychyy/starfyre that referenced this issue Aug 28, 2023
Get the latest changes and solved merge conflicts

sparckles#39
SuelenKarbivnychyy added a commit to SuelenKarbivnychyy/starfyre that referenced this issue Aug 31, 2023
Fixed the text node order of slot components and implemented a approach to have the correct behavior when custom compoment is the  root node in __innit__.fyre

BREAKING CHANGE: sparckles#39
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

No branches or pull requests

2 participants