-
Notifications
You must be signed in to change notification settings - Fork 5
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
Feat: Schema Instances #90
Conversation
The implementation of state in this component is incorrect and unnecessary. I have removed it here for simplicity of component state management upstream from this component.
This commit includes a new component event handler "handleUpdate". It is intended to be passed to button "onClick" events that would allow a menu to be configured to load a different schema for each button. example: ``` // a Button component definition that accepts an "onClick" event handler const Button = ({ name, value, onClick }) => <button type="button" value={value} onClick={onClick}>{name}</button>; // an instance of Button <Button name="component" value="component" onClick={handleUpdate} /> ```
Implements the React Router module to allow a single React component to route to the various schema definition sections. The page remains the same each time, but using URL queries for the type and instance of a schema, the content is re-rendered with the appropriate data tables.
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/hamlet/hamlet-docs/of73z010j |
Converted back to draft whilst I investigate why local hosting works, but app build does not. |
Builds now passing correctly. PR ready for review |
Description
Refactor reference data pages into one page, rendering only the chosen Schema Type/Instance. Deep linking is supported by way of URL query parameters i.e
https://docs.hamlet.io/reference?type=component&instance=baseline
To test, run locally and visit : http://localhost:3000/reference
Addresses:
Closes #57
Closes #58
Closes #59
Closes #60
Closes #61
Target Audience
Types of changes
Documentation
Site Design
Followup Actions
apigateway
once Feature - Composite Object AttributeSet Attribute engine#1502 is merged (schema won't generate until then due to a merge of new content ahead of this dependency)Checklist:
hamlet roadmap
project.