Skip to content

Conversation

jdkoren
Copy link
Contributor

@jdkoren jdkoren commented Dec 3, 2019

Also separate it from oneLineDoc and update the templates accordingly.

Also separate it from oneLineDoc and update the templates accordingly.
@googlebot googlebot added the cla: yes Google CLA check succeeded. label Dec 3, 2019
Copy link
Contributor

@jcollins-g jcollins-g left a comment

Choose a reason for hiding this comment

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

Nice, this should clean things up.

}
return _oneLineDoc;
}
String get oneLineDoc => _documentation.asOneLiner;
Copy link
Contributor

Choose a reason for hiding this comment

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

glad the no-super workaround is gone

'Returns a length. <a href="fake/WithGetterAndSetter/lengthX.html">[...]</a>'));
expect(lengthX.oneLineDoc, equals('Returns a length.'));
expect(lengthX.extendedDocLink,
equals(ModelElementRendererHtml().renderExtendedDocLink(lengthX)));
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should have at least one literal matching string here for the Html renderer test, especially since it is very targeted -- otherwise we're simply validating that extendedDocLink returns whatever the renderer does.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@jcollins-g
Copy link
Contributor

@jdkoren Also, whenever I touch the templates I like to upload sample screenshots. It helps make sure there's not some subtle rendering problem I introduced, as the unit tests don't always cover how the browser shows something. Could you upload a sample screenshot or two of pages with the changed templates?

@jdkoren
Copy link
Contributor Author

jdkoren commented Dec 3, 2019

Screenshots before and after of a library:
master_ex_ex-library html
test_ex_ex-library html

Screenshots before and after of a class:
master_fake_AClassWithFancyProperties-class html
test_fake_AClassWithFancyProperties-class html

I had to add a minor fix to prevent enum ordinal members from showing an extended doc link.
Screenshots before and after of an enum:
master_fake_Color-class html
test_fake_Color-class html

@jdkoren jdkoren merged commit d72989a into dart-lang:master Dec 3, 2019
@jdkoren jdkoren deleted the onelinedoc branch January 7, 2020 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Google CLA check succeeded.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants