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

CPLAT-4109: Update documentation for dart2 #231

Merged
merged 11 commits into from
Feb 7, 2019

Conversation

corwinsheahan-wf
Copy link
Contributor

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:

  • CI Passes

Potential areas of regression:

N/A


FYA: @greglittlefield-wf @aaronlademann-wf @kealjones-wk @evanweible-wf @maxwellpeterson-wf @sebastianmalysa-wf @smaifullerton-wk @georgelesica-wf

@aviary3-wk
Copy link

Security Insights

No security relevant content was detected by automated scans.

Action Items

  • Review PR for security impact; comment "security review required" if needed or unsure
  • Verify aviary.yaml coverage of security relevant code

Questions or Comments? Reach out on Slack: #support-infosec.

@corwinsheahan-wf corwinsheahan-wf changed the title CPLAT-4109: Update readme for dart2 CPLAT-4109: Update documentation for dart2 Feb 7, 2019
Copy link
Contributor Author

@corwinsheahan-wf corwinsheahan-wf left a 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
Copy link
Contributor Author

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?

Copy link
Contributor

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

Copy link
Contributor Author

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 Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
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.
Copy link
Contributor

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`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
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).
Copy link
Contributor

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!_
Copy link
Contributor

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.


```

5. Finally, it the initializer for our factory (_$Foo) is generated with a function that returns a new instance of our
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
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

Copy link
Contributor

@aaronlademann-wf aaronlademann-wf left a 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
Copy link
Contributor

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

Copy link
Contributor Author

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__.
Copy link
Contributor

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.

dart-lang/build#352 (comment)

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)).
Copy link
Contributor

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.

Copy link
Contributor

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

docs.yml Show resolved Hide resolved
Copy link
Contributor

@aaronlademann-wf aaronlademann-wf left a comment

Choose a reason for hiding this comment

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

+1

@aaronlademann-wf
Copy link
Contributor

+1 refresh

docs.yml Outdated Show resolved Hide resolved
Co-Authored-By: corwinsheahan-wf <corwin.sheahan@workiva.com>
@evanweible-wf
Copy link
Contributor

QA +1

  • CI passes (mostly documentation changes)

@Workiva/release-management-p

@evanweible-wf evanweible-wf added the dart2 PRs targeting our effort to get to Dart SDK 2.0 compatibility label Feb 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dart2 PRs targeting our effort to get to Dart SDK 2.0 compatibility Merge Requirements Met RM Ready
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants