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

[ALT-817-core] Add github documentation for the core package #603

Merged
merged 1 commit into from
May 20, 2024

Conversation

ryunsong-contentful
Copy link
Contributor

@ryunsong-contentful ryunsong-contentful commented May 14, 2024

Purpose

Adds github documentation for the core package
NOTE: One section that was excluded was the Deployment Pattern with user_interface section because the ui is a private repo whereas experience-builder is a public repo. Therefore the deployment/build explanation probably belongs in a private doc.

Approach

Speak to SMEs, take notes, and the perform the README write up

Screenshot 2024-05-14 at 10 48 19 AM

@ryunsong-contentful ryunsong-contentful requested review from a team as code owners May 14, 2024 16:48
Copy link

vercel bot commented May 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
experience-builder-test-app ✅ Ready (Inspect) Visit Preview May 15, 2024 3:56pm

Copy link
Contributor

@primeinteger primeinteger left a comment

Choose a reason for hiding this comment

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

You can also use the "View file" option to view the rendered markdown in github. That is handy because the preview tools in code editors don't always match the rendering in github.

Screenshot 2024-05-14 at 3 32 37 PM

## Documentation
### Concepts
- **Deep binding**: Relates to the ability to resolve n references. Such an entry containing a reference to another entry which may also contain a reference to another entry and so on.
- **Component Definition** Baseline definition to outline what is needed to define all component types whether it is a structure, built-in, or custom component.
Copy link
Contributor

Choose a reason for hiding this comment

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

Small style suggestion to align with the format of other bullet items

Suggested change
- **Component Definition** Baseline definition to outline what is needed to define all component types whether it is a structure, built-in, or custom component.
- **Component definition**: Baseline definition to outline what is needed to define all component types whether it is a structure, built-in, or custom component.

This package provides core internal functionality for the [Experiences SDK](https://www.contentful.com/developers/docs/experiences/set-up-experiences-sdk/).
### Purpose
- To contain shared code and utilities across the Experience-builder packages such as constants, types, transformers, and hooks.
- This means additions to core should be framework agnostic. For example, code that is only compatible with React do not belong in the core package.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- This means additions to core should be framework agnostic. For example, code that is only compatible with React do not belong in the core package.
- This means additions to core should be framework agnostic. For example, code that is only compatible with React does not belong in the core package.

Comment on lines 28 to 17
[Data Structures](https://www.contentful.com/developers/docs/experiences/data-structures/)
[Design Tokens](https://www.contentful.com/developers/docs/experiences/design-tokens/)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be a bulleted list so the links are on separate lines? Currently it renders like this:

Screenshot 2024-05-14 at 3 39 10 PM

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My plugin lied to me

Screenshot 2024-05-15 at 9 43 20 AM

Copy link
Contributor

Choose a reason for hiding this comment

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

Might be time to delete that extension! Vscode has native support for previewing markdown now and it renders very similar to github

Screenshot 2024-05-15 at 10 32 48 AM

If you want make the two links appear on different line without using bullets, you can add a \ to force a line break after the first link:

### Relevant Contentful Documentation Links
[Data Structures](https://www.contentful.com/developers/docs/experiences/data-structures/)\
[Design Tokens](https://www.contentful.com/developers/docs/experiences/design-tokens/)

Comment on lines 14 to 25
```
"typesVersions": {
"*": {
"types": [
"./dist/types.d.ts"
],
"constants": [
"./dist/constants.d.ts"
]
}
},
```
Copy link
Contributor

Choose a reason for hiding this comment

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

IMO - this chunk of code is not important enough to put in the readme. I think the description you added with the package names will suffice

@ryunsong-contentful ryunsong-contentful merged commit 2341477 into development May 20, 2024
9 checks passed
@ryunsong-contentful ryunsong-contentful deleted the ALT-817-core branch May 20, 2024 17:34
@@ -1,7 +1,17 @@
# @contentful/experiences-core

This package provides core internal functionality for the [Experiences SDK](https://www.contentful.com/developers/docs/experiences/set-up-experiences-sdk/).
### Purpose
- To contain shared code and utilities across the Experience-builder packages such as constants, types, transformers, and hooks.

Choose a reason for hiding this comment

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

Is it currently "Experience-builder packages" or "Experiences packages"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Experiences packages is more correct


## Documentation
### Concepts
- **Deep binding**: Relates to the ability to resolve n references. Such an entry containing a reference to another entry which may also contain a reference to another entry and so on.

Choose a reason for hiding this comment

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

"n references" is probably a typo?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

n references is using more of a mathematical language, where n represents a variable that conveys any number of references. I'll just update this to say ability to resolve multiple references

### Concepts
- **Deep binding**: Relates to the ability to resolve n references. Such an entry containing a reference to another entry which may also contain a reference to another entry and so on.
- **Component definition** Baseline definition to outline what is needed to define all component types whether it is a structure, built-in, or custom component.
- **Entity**: Contentful entries that get converted into an experience object that can be used within the experience builder packages.

Choose a reason for hiding this comment

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

again: experience builder or experiences packages?

- **Deep binding**: Relates to the ability to resolve n references. Such an entry containing a reference to another entry which may also contain a reference to another entry and so on.
- **Component definition** Baseline definition to outline what is needed to define all component types whether it is a structure, built-in, or custom component.
- **Entity**: Contentful entries that get converted into an experience object that can be used within the experience builder packages.
- **Fetchers**: The helper classes and functions in the Entity directory get consumed by the fetchers which get bundled up into either `fetchBySlug` or `fetchById`. The listed fetchers are the two main functions that are exposed to the end user in the sdk to fetch a user's experience which is stored in Contentful as an entry.

Choose a reason for hiding this comment

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

SDK

- **Component definition** Baseline definition to outline what is needed to define all component types whether it is a structure, built-in, or custom component.
- **Entity**: Contentful entries that get converted into an experience object that can be used within the experience builder packages.
- **Fetchers**: The helper classes and functions in the Entity directory get consumed by the fetchers which get bundled up into either `fetchBySlug` or `fetchById`. The listed fetchers are the two main functions that are exposed to the end user in the sdk to fetch a user's experience which is stored in Contentful as an entry.
- **Registries**: An in memory storage technique that the user can decide to provide for themselves or other personas in the editor canvas. Design Tokens is an useful example where a user can provide their own thematic values with regards to text size, component sizes, spacing, colors, and borders in a json format that is resolved by the registry and provided as options in the ui editor sidebar.

Choose a reason for hiding this comment

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

in-memory...Deisgn tokens...JSON...UI editor


Please refer to our [Documentation](https://www.contentful.com/developers/docs/experiences/) to learn more about it.
### Relevant Contentful Documentation Links

Choose a reason for hiding this comment

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

Relevant Contentful documentation links


Please refer to our [Documentation](https://www.contentful.com/developers/docs/experiences/) to learn more about it.
### Relevant Contentful Documentation Links
- [Data Structures](https://www.contentful.com/developers/docs/experiences/data-structures/)

Choose a reason for hiding this comment

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

Data structures

Please refer to our [Documentation](https://www.contentful.com/developers/docs/experiences/) to learn more about it.
### Relevant Contentful Documentation Links
- [Data Structures](https://www.contentful.com/developers/docs/experiences/data-structures/)
- [Design Tokens](https://www.contentful.com/developers/docs/experiences/design-tokens/)

Choose a reason for hiding this comment

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

Design tokens

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

3 participants