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(conditional render): support props as conditional identifier #144

Merged
merged 1 commit into from
Apr 4, 2019

Conversation

alexnm
Copy link
Contributor

@alexnm alexnm commented Apr 3, 2019

until now only state was allowed

closes #75

@alexnm alexnm requested a review from vladnicula April 3, 2019 15:30
@codecov
Copy link

codecov bot commented Apr 3, 2019

Codecov Report

Merging #144 into release/0.6 will decrease coverage by 0.12%.
The diff coverage is 56.25%.

Impacted file tree graph

@@               Coverage Diff               @@
##           release/0.6     #144      +/-   ##
===============================================
- Coverage           87%   86.87%   -0.13%     
===============================================
  Files               50       50              
  Lines             1747     1753       +6     
  Branches           201      203       +2     
===============================================
+ Hits              1520     1523       +3     
- Misses             204      205       +1     
- Partials            23       25       +2
Impacted Files Coverage Δ
src/shared/utils/ast-jsx-utils.ts 78.84% <50%> (+0.2%) ⬆️
...gins/teleport-plugin-react-base-component/utils.ts 69.85% <62.5%> (-1.14%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bcc50a3...b31a8f9. Read the comment docs.

@vladnicula vladnicula merged commit 50da272 into release/0.6 Apr 4, 2019
@alexnm alexnm deleted the feature/#45-render-conditional-on-props branch April 8, 2019 08:44
alexnm added a commit that referenced this pull request Apr 8, 2019
* refactor(Support json attributes): Handle json attributes form uidl component files

No UIDL schmea update. Adds handling for new schema definition for attributes from
#35#issuecomment-477526242

BREAKING CHANGE: After this change, assigning string values on attributes will throw error. Use the
new json structure instead.

re #35, re #87, re #105

* Add repeat test and update structrue

* Temp commit

* Patch up attempt to support string in attribute

* Tests pass after merge with master

* refactor(attrs): dynamic and static nodes for all ocurrences of $ str… (#120)

* refactor(attrs): dynamic and static nodes for all ocurrences of $ strings

only text nodes are left with the old implementation, but they require more changes in the UIDL
structure. Repeats are now working as expected with both dynamic and static attributes as the
datasource

BREAKING CHANGE: old UIDLs don't work anymore

#35

* refactor(mapping): new UIDL attribute structure used to replace $attrs. reference

BREAKING CHANGE: Old mappings do not work anymore

#35

* refactor(dataSource): Switch statement for selecting the right identifier

* Refactor/#117 style props uidl (#127)

* Attrs update for main exmaple uidls

* Functional basic styles in react component generators

* Add nested style tests. Failing vue, working react

* Typo fixes

* Passing tests for vue generaorts wiht new style definitions

* All tests passing for new style definitions

* Hacky fix for static content not supportive of arrays

* WIP: Feature/#112 object referinging in dynamic assignments (#131)

* Add back commented tests

* Vue generators support for object props

* Feature/#118 udil string to json props (#130)

* Style object utils for mixed uidl values

* Attributes mapping to new json values

* Feature/#112 object referinging in dynamic assignments (#132)

* Add back commented tests

* Vue generators support for object props

* Fix styledjsx incorect props assignment

* Refactor/#105 component structure changes (#134)

* refactor(UIDL Structure): Differentiate between Node and Element

BREAKING CHANGE: UIDLs need to be written in the new form

#105

* refactor(UIDL Structure): Mapping and Repeat

BREAKING CHANGE: Old UIDLs and Mappings don't work anymore

#105

* refactor(UIDL Structure): Conditional rendering nodes in the UIDL

BREAKING CHANGE: New way of describing states

#closes 105

* refactor(UIDL Structure): Routing implemented based on the new UIDL nodes

BREAKING CHANGE: Old UIDLs not working anymore

#105

* refactor(UIDL Structure): Routing for all project-generators

#105

* refactor(UIDL Structure): improve tests

* test(UIDL Structure): All tests running except for validators

#105

* Refactor/minor cleanup in 0.6 (#138)

* refactor(Switch statement in react node generation): Add switch statement for node type

Changes react node generation to use a switch which returns a proper value, no longer :any.

* refactor(Switch statement in vue component generation): Add switch statement for node type

* refactor(Common types for generator functions):

Adds common types for the generateNodeSyntax function and addAttribute functions. Opens up the way
to standardizing the entire component generation process.

* Remove accumulators in switch statements

* Fixes/release 0.6 (#142)

* refactor(Switch statement in react node generation): Add switch statement for node type

Changes react node generation to use a switch which returns a proper value, no longer :any.

* refactor(Switch statement in vue component generation): Add switch statement for node type

* refactor(Common types for generator functions):

Adds common types for the generateNodeSyntax function and addAttribute functions. Opens up the way
to standardizing the entire component generation process.

* Remove accumulators in switch statements

* Make sure import statements are added in the new uidl for project examples

* feat(React Conditional Stmt Improvements): Better boolean checks

Transforms conditionalVariable === true to conditionalVariable and condVar === false to !condVar

fix #139

* Rename stateIdentifier back to normal

* Refactor(component-generators): Refactored component generators inter… (#137)

* refactor(component-generators): Refactored component generators interface to expose an array of file

re #27

* refactor(component-generators): Fixed vue page file name. Refactored project-utils

re #27

* refactor(component-generator): Renamed extension to fileType and removed the dot

re #27

* refactor(component-generators): Fixed example file to have running generators

* refactor(component-generators): Updated UIDL smaple to include style info

re #27

* refactor(component-generators): Fixed component and style tests

re #123

* refactor(component-generators): Updated all tests to new stucture

fix #27

* feat(conditional render): support props as conditional identifier (#144)

until now only state was allowed

closes #75

* Fix for #148 (#150)

* Fix for #148

* Log the entrie stack for errors

* Remove commented out code for dynamic props

* Same treatment for dynamics in both reapet and children

* Member expression to jsx expression container

* feat(uidl-schema): uidl-schema-update (#143)

* feat(uidl-schema): adding partial uidl-schema

* feat(new uidl schema): adding uidl schema

new uidl schema. deleting old one. fix on tests. decommenting tests.

* feat(mapping): children placeholder implementation with new UIDL node structure (#149)

added referenceType 'children' to support composition between mapping structure and uidl structure

BREAKING CHANGE: old UIDLs don't work with the new structure

resolve #44

* chore(tests): remove console.log

* chore: typings for new file

* refactor(Better project error): Full stack trace log (#162)

When a component fails to render I'd like to know where the error happened and why. Simply wwarning
the error is not enough

* Feature/#118 uidl transform in pipeline (#155)

* Flow is ready for parsing string value of uidl

* Parser passing tests expect for old children

* Fix failing tests due to missing interface imports

* Children parsing according to current 0.6 spec

* Remove useless test

* Support repeater and conditional in string to object parsing

* Pass noClone in component parser when running from project #155

* feat(slots): support for React children and Vue <slot> (#158)

* feat(slots): support for React children and Vue <slot>

closes #156

* feat(slots): Support for traversing through slot nodes

closes #156

* chore: typo
@JayaKrishnaNamburu JayaKrishnaNamburu added react generators Issue related to the react generator vue generators Issue related to the vue generator labels Apr 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
react generators Issue related to the react generator vue generators Issue related to the vue generator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants