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

Feat: Schema Instances #90

Merged
merged 22 commits into from
Feb 10, 2021
Merged

Conversation

RossMurr4y
Copy link
Collaborator

@RossMurr4y RossMurr4y commented Jan 29, 2021

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

  • hamlet users
  • hamlet framework developers (incl. plugins)

Types of changes

Documentation

  • Spelling / Syntax correction only
  • Refactor (Documentation overhaul, or revising after changes to hamlet)
  • New feature (Documenting something new)

Site Design

  • Refactor (No new or removed content.)
  • New Features & Content
  • Docusaurus / Plugin version update.

Followup Actions

Checklist:

  • I have tested the changes locally - see README.md
  • I have added appropriate labels to this PR.
  • I have added this to the hamlet roadmap project.

Ross Murray added 10 commits January 29, 2021 16:03
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.
@RossMurr4y RossMurr4y added documentation Improvements or additions to documentation enhancement New feature or request labels Jan 29, 2021
@RossMurr4y RossMurr4y requested a review from a team January 29, 2021 05:11
@vercel
Copy link

vercel bot commented Jan 29, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/hamlet/hamlet-docs/of73z010j
✅ Preview: https://hamlet-docs-git-fork-rossmurr4y-feat-manyschemas.hamlet.now.sh

@vercel vercel bot temporarily deployed to Preview January 29, 2021 05:11 Inactive
@vercel vercel bot temporarily deployed to Preview January 29, 2021 05:15 Inactive
@RossMurr4y RossMurr4y marked this pull request as draft February 1, 2021 04:39
@RossMurr4y
Copy link
Collaborator Author

Converted back to draft whilst I investigate why local hosting works, but app build does not.

@vercel vercel bot temporarily deployed to Preview February 8, 2021 02:30 Inactive
@RossMurr4y
Copy link
Collaborator Author

Builds now passing correctly. PR ready for review

@RossMurr4y RossMurr4y marked this pull request as ready for review February 8, 2021 02:33
@roleyfoley roleyfoley merged commit 3b6f8b0 into hamlet-io:master Feb 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
2 participants