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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation for Slot component #90

Closed
wants to merge 1 commit into from
Closed

Conversation

michalczaplinski
Copy link
Member

@michalczaplinski michalczaplinski commented Jun 10, 2020

This is the documentation for the <Slot/> component.

Feature Discussion: https://community.frontity.org/t/slot-and-fill/895
PR into frontity/frontity: frontity/frontity#475

This is not complete yet. We're missing:

  • A general explanation of the Slot and Fill pattern (as already mentioned by @luisherranz Add docs for useFills hook聽#75 (comment))
  • How to insert the Fills into the state:
    • explain namespaces
    • explain what the library property refers to
  • More use cases:
    • How to pass props to Fills (e.g by setting state.fills.fillNamespace.fillName.props)
    • Using multiple Fills with different priority in the same slot

etc.

Admittedly, some of the above are more related to how to use the Slot and fill pattern in general.

Let me know if you guys would need more help with this 馃檪

@michalczaplinski
Copy link
Member Author

Assigned @mburridge cause you're the supporter this week 馃檪

@luisherranz
Copy link
Member

Hey Michal, I think you've mistakenly added this to @frontity/components instead of frontity.

Also, as this is not ready yet, I'm going to turn it into a draft 馃憤

@luisherranz luisherranz marked this pull request as draft June 15, 2020 10:42
@juanmaguitar
Copy link
Member

Just to add more context about this

According to the latest Sprint (Sprint 4) status

This feature is finished but it's not released yet

The code PR is merged but the Feature Discussion is still as "Currently in Development" until the feature is released

@michalczaplinski
Copy link
Member Author

Hey @mburridge let me know if you need help or more information to finish the documentation here 馃檪

@mburridge
Copy link
Member

mburridge commented Jul 15, 2020

@michalczaplinski A quick question:

Were data assertions implemented (as described at https://community.frontity.org/t/slot-and-fill/895/3)? Do they need documenting?

@michalczaplinski
Copy link
Member Author

Should the useFills hook that is used behind the scenes here also be documented? If so should it be documented here along with the Slot and Fill documentation, or separately elsewhere?

yes, it should also be documented. Mind, that there already exists some basic documentation for it: https://docs.frontity.org/api-reference-1/frontity#usefills

I think the hook will be used less often than the Slot component, because I think that in most cases the <Slot/> component should be enough. We expose it so that the users can build their own, perhaps more sophisticated versions of <Slot/> for some use cases that we have not anticipated or some special use cases that don't want to cover out of the box.

I ll leave it up to you to decide where and how to document that 馃檪

Were data assertions implemented (as described at https://community.frontity.org/t/slot-and-fill/895/3)? Do they need documenting?

Nope, they were not implemented yet so no docs needed 馃檪 . I've updated the announcement on the forum to clarify that: https://community.frontity.org/t/slot-and-fill/895/19

@mburridge
Copy link
Member

@michalczaplinski

I found the useFills docs so edited my question to remove that. Let me know if more content is needed there. I think you were probably answering just as I edited the question! 馃槃

I've opened a new PR for this now: #168

@mburridge mburridge closed this Aug 3, 2020
@juanmaguitar juanmaguitar deleted the slot-component branch June 2, 2021 06:48
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

4 participants