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

create input text field for propertyTemplate (Type literal) #180

Merged
merged 2 commits into from Nov 20, 2018

Conversation

SaravShah
Copy link
Contributor

@SaravShah SaravShah commented Nov 16, 2018

In the resourceTemplate, takes care of type: 'literal' and mandatory: 'false' properties.

ResourceTemplate = 'resourceTemplate:bf2:Monograph:Instance'
screen shot 2018-11-19 at 10 43 16 am

Then when you change the resourceTemplate to resourceTemplate:bf2:WorkTitle:
screen shot 2018-11-19 at 10 47 54 am

paired w/ @jgreben
closes #166

Edit:

Here are the stubs depending on the ResourceTemplate-
screen shot 2018-11-20 at 10 04 34 am

Note: updated eslint max warnings from 60 to 65

@jermnelson
Copy link
Contributor

jermnelson commented Nov 17, 2018

Looking good, the only thing I might suggest is adding the bootstrap form-control class to the input field, see https://getbootstrap.com/docs/3.3/css/#forms

@SaravShah SaravShah force-pushed the input-literal branch 2 times, most recently from 63a9d6c to 2501fe0 Compare November 19, 2018 18:11
@coveralls
Copy link

coveralls commented Nov 19, 2018

Coverage Status

Coverage decreased (-4.3%) to 80.498% when pulling dcfc2af on input-literal into 79e9f5c on master.

@SaravShah SaravShah changed the title [WIP] Input literal create input text field for propertyTemplate (Type literal) Nov 19, 2018
@SaravShah
Copy link
Contributor Author

(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'
Copy link
Contributor

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.

Copy link
Contributor Author

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?

Copy link
Contributor

@ndushay ndushay left a 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.

@SaravShah SaravShah added the BFF label Nov 20, 2018
Copy link
Contributor

@ndushay ndushay left a 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>)
Copy link
Contributor

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 ...

@SaravShah SaravShah force-pushed the input-literal branch 2 times, most recently from 3a91c88 to 12b5df0 Compare November 20, 2018 19:28
@ndushay ndushay merged commit c4b6cba into master Nov 20, 2018
@ndushay ndushay deleted the input-literal branch November 20, 2018 19:37
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.

create input text field for propertyTemplate without lookups
4 participants