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: add support for most existing primitives #194

Merged
merged 1 commit into from
Nov 5, 2021
Merged

feat: add support for most existing primitives #194

merged 1 commit into from
Nov 5, 2021

Conversation

dpilch
Copy link
Member

@dpilch dpilch commented Nov 3, 2021

  • add support for most existing primitives
  • do not add TextField primitive because it requires special logic
    • TextFieldProps takes a type parameter. Need to think more on how to handle this.
  • Add basic integ components
    • only enough properties, bindingProperties, etc. to get the components to render
    • no test cases added yet.

To Do:

  • create Asana task on TypeScript ignore issue and update comment with issue number

@@ -0,0 +1,63 @@
/*
Copy link
Member Author

Choose a reason for hiding this comment

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

renamed component-renderer.test.ts -> primitives.test.ts

@@ -94,64 +117,23 @@ export class AmplifyRenderer extends ReactStudioTemplateRenderer {
case Primitives.Divider:
return new ReactComponentRenderer<DividerProps>(component, this.importCollection, parent).renderElement();

case Primitives.Field:
Copy link
Member Author

Choose a reason for hiding this comment

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

These primitives are not exposed from amplify-ui. I included these by mistake originally.

@dpilch dpilch force-pushed the primitives branch 3 times, most recently from 0815fd2 to 9cf2c64 Compare November 4, 2021 21:23
@dpilch dpilch changed the title [WIP] add all current primitives feat: add support for most existing primitives Nov 4, 2021
@@ -15,7 +15,7 @@
"build:watch": "npm run build -- --watch"
},
"devDependencies": {
"@aws-amplify/ui-react": "^0.0.0-next-202192018414",
"@aws-amplify/ui-react": "^0.0.0-next-2021101222549",
Copy link
Member Author

Choose a reason for hiding this comment

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

Some primitives were added recently. We could also stick with current version and start with what is available.

@dpilch dpilch marked this pull request as ready for review November 4, 2021 21:29
const jsxStatement = factory.createParenthesizedExpression(
this.renderConfig.script !== ScriptKind.TSX
? jsx
: /* add ts-ignore comment above jsx statement TODO: add asana */
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd drop the ref to asana here. I'm just now realizing I'd done this as well, but unless it's an externally visible issue we shouldn't be referencing it in code.

Do not add TextField primitive because it requires special logic
@dpilch dpilch merged commit f1fe271 into main Nov 5, 2021
@dpilch dpilch deleted the primitives branch November 5, 2021 15:25
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.

2 participants