-
Notifications
You must be signed in to change notification settings - Fork 58
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
CPLAT-4109: Update documentation for dart2 #231
Conversation
Security InsightsNo security relevant content was detected by automated scans. Action Items
Questions or Comments? Reach out on Slack: #support-infosec. |
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.
Just one question
CONTRIBUTING.md
Outdated
Name | Branch | ||
---- | ------ | ||
over_react 2.x.x-dart1 | master_dart1 | ||
over_react 2.x.x-dart2 | master |
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.
Shouldn't these be +dart1
and +dart2
? Also, I thought we had talked about dropping the suffix for dart2 and just have 2.x.x
for Dart 2, and 2.x.x+dart1
for Dart 1. Is that still a thing?
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 am 90% sure one of our internal release tools has an issue with the +
character, so we've used -
in the past. That's one of the reasons I want to do a dev release of 2.0 to make sure that works.
And yeah we had talked about that, I'd be cool with dropping the dart2
suffix
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.
Cool. +1 on dropping the dart2
suffix.
README.md
Outdated
@@ -184,25 +159,29 @@ or [as a typed view into an existing props map](#uiprops-as-a-map). | |||
### UiProps | |||
|
|||
__`UiProps` is a Map class__ that adds statically-typed getters and setters for each React component prop. | |||
It can also be invoked as a function, serving as a builder for its analogous component. | |||
It can also be invoked as a function, serving as a builder for its analogous component. |
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.
trailing space
README.md
Outdated
* Note: The [builder] will make the concrete getters and setters available in a generated class which has the same name | ||
as the class annotated with `@State()`, but without the `_$` prefix (which would be `FooState` in the above code). | ||
The generated class will also have the same API. So, consumers who wish to extend the functionality of `_$FooState` should | ||
use the generated version, `FooProps`. |
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.
use the generated version, `FooProps`. | |
use the generated version, `FooState`. |
README.md
Outdated
@@ -664,7 +647,8 @@ Now that we’ve gone over how to [use the `over_react` package in your project] | |||
the [anatomy of a component](#anatomy-of-an-overreact-component) and the [DOM components](#dom-components-and-props) | |||
that you get for free from OverReact, you're ready to start building your own custom React UI components. | |||
|
|||
1. Start with one of the [component boilerplate templates](#component-boilerplate-templates) below. | |||
1. Start with one of the [component boilerplate templates](#component-boilerplate-templates) below | |||
(Or, use OverReact's [code snippets for Intellij and Vs Code](snippets/README.md). |
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.
Need another closing paren )
at the end here
README.md
Outdated
@@ -674,7 +658,7 @@ that you get for free from OverReact, you're ready to start building your own cu | |||
4. Run [the app you’ve set up to consume `over_react`](#using-it-in-your-project) | |||
|
|||
```bash | |||
$ pub serve | |||
$ pub run build_runner serve | |||
``` | |||
|
|||
_That’s it! Code will be automatically generated on the fly by Pub!_ |
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.
This isn't accurate anymore, the builder is generating the code not pub.
lib/src/builder/README.md
Outdated
|
||
``` | ||
|
||
5. Finally, it the initializer for our factory (_$Foo) is generated with a function that returns a new instance of our |
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.
5. Finally, it the initializer for our factory (_$Foo) is generated with a function that returns a new instance of our | |
5. Finally, the initializer for our factory (_$Foo) is generated with a function that returns a new instance of our |
…ct into update_readme_for_Dart2
…e_readme_for_Dart2
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.
Few minor things.
|
||
```bash | ||
$ pub run test --pub-serve=8081 test/your_test_file.dart | ||
$ pub run build_runner test -- -p chrome test/your_test_file.dart |
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.
This doesn't work. Have to run
pub run build_runner test -- -P dartdevc
or
pub run build_runner test -r -- -P dart2js
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.
Those presets apply to this project only, and may not be present in consumer repos. pub run build_runner test -- -p chrome test/your_test_file.dart
should be valid for a generic case.
I'll update with a section for running tests in this repo as well as the more generic command.
- $dart2js | ||
``` | ||
When running tests on code that uses our [builder] _(or any code that imports `over_react`)_, | ||
__you must run your tests using build_runner__. |
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.
Should add a huge, bold callout here that any running build_runner watch
or build_runner serve
tasks should be killed before running build_runner test
to avoid destruction of the cached asset graph.
README.md
Outdated
@@ -664,7 +646,8 @@ Now that we’ve gone over how to [use the `over_react` package in your project] | |||
the [anatomy of a component](#anatomy-of-an-overreact-component) and the [DOM components](#dom-components-and-props) | |||
that you get for free from OverReact, you're ready to start building your own custom React UI components. | |||
|
|||
1. Start with one of the [component boilerplate templates](#component-boilerplate-templates) below. | |||
1. Start with one of the [component boilerplate templates](#component-boilerplate-templates) below | |||
(Or, use OverReact's [code snippets for Intellij and Vs Code](snippets/README.md)). |
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.
this relative link won't work when the readme is published, for instance, to pub.dartlang.org
. It needs to be an absolute link to that readme.
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.
Same thing on line 672
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.
+1
…_readme_for_Dart2
+1 refresh |
Co-Authored-By: corwinsheahan-wf <corwin.sheahan@workiva.com>
QA +1
@Workiva/release-management-p |
Ultimate problem:
The transformer is gone and the boilerplate has changed, so we need to update documentation to reflect that.
How it was fixed:
Update documentation/transformer references.
Testing suggestions:
Potential areas of regression:
N/A