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
create input text field for propertyTemplate (Type literal) #180
Conversation
Looking good, the only thing I might suggest is adding the bootstrap |
63a9d6c
to
2501fe0
Compare
(Coverage is failing because we are not using propertyTemplate anymore - using FormWrapper now) |
@@ -1,19 +1,22 @@ | |||
// Copyright 2018 Stanford University see Apache2.txt for license | |||
import React from 'react' | |||
import { shallow } from 'enzyme' | |||
import PropertyTemplate from '../../../src/components/editor/PropertyTemplate' | |||
import InputLiteral from '../../../src/components/editor/InputLiteral' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's keep PropertyTemplate for the types of properties we cannot yet do anything with (e.g. resource) ... eventually it will go away in favor of the specific treatments for each type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i've updated the code and added some header stubs that can be filled in by who ever is working on that type. for now its just a header saying " I am a ____type" where it can be filled in by resource
target
or lookup
- does that work for you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
o.w. looks good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see this from eslint:
/home/circleci/sinopia_editor/src/components/editor/InputLiteral.jsx
7:9 warning Form label must have ALL of the following types of associated control: nesting, id jsx-a11y/label-has-for
So, two comments
) | ||
} | ||
else if (pt.type == 'resource'){ | ||
return (<h1> I am a resource type! </h1>) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one suggestion is to maybe make these h3 or h4 or p ...
3a91c88
to
12b5df0
Compare
12b5df0
to
dcfc2af
Compare
In the resourceTemplate, takes care of
type: 'literal'
andmandatory: 'false'
properties.ResourceTemplate = 'resourceTemplate:bf2:Monograph:Instance'
Then when you change the resourceTemplate to resourceTemplate:bf2:WorkTitle:
paired w/ @jgreben
closes #166
Edit:
Here are the stubs depending on the ResourceTemplate-
Note: updated eslint max warnings from 60 to 65