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

chore(docs): aliases for dotnet/chsarp docs. #5162

Merged
merged 9 commits into from Jan 29, 2021
Merged

chore(docs): aliases for dotnet/chsarp docs. #5162

merged 9 commits into from Jan 29, 2021

Conversation

avodovnik
Copy link
Contributor

Starting to clean-up/add docs related to the C# port, beginning with aliases for QuerySelector functions.

@@ -59,6 +59,7 @@ ElementHandle instances can be used as an argument in [`method: Page.$eval`] and
## async method: ElementHandle.$
* langs:
- alias-python: query_selector
- alias-csharp: QuerySelectorAsync
Copy link
Member

Choose a reason for hiding this comment

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

I think a better solution would be to consistently rename it to querySelector in all of our mds, then alias it into $ only in JS

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Going through that now, I really wish we'd use a language that would let me say "Find All References" :-)

@@ -70,6 +71,7 @@ returns `null`.
## async method: ElementHandle.$$
* langs:
- alias-python: query_selector_all
- alias-csharp: QuerySelectorAllAsync
Copy link
Member

Choose a reason for hiding this comment

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

ditto

@yury-s
Copy link
Member

yury-s commented Jan 29, 2021

@avodovnik I rebased your patch on top of my changes, applied a couple more fixes and uploaded everything to https://github.com/yury-s/playwright/commits/avodovnik-dev/anvod/dotnet/docs (sorry, didn't manage to push to this PR directly, may be it's not possible), feel free to upload it here. We need to fix docs generator before committing this PR though as method names in js docs are not generated correctly (I tried with SRC_DIR=~/playwright npm run roll).

@yury-s
Copy link
Member

yury-s commented Jan 29, 2021

Okay, docs generator is fixed in microsoft/playwright.dev#97, this change is good to go.

avodovnik and others added 3 commits January 29, 2021 09:07
We now default to a readable name (querySelector, querySelectorAll, etc)
for relevant functions and introduces a JavaScript alias for the rest.

Additionally, this adds an exception throw when the match for option failed,
because that proved to be a faster way to resolve the problems as they show up.
Update javascript.md
Update python.md
match by alias
Update more inline links
Remove spaces from langs list
@avodovnik
Copy link
Contributor Author

@yury-s OK, I think I got your changes from that branch over here, but I'd appreciate a quick cursory check.

@avodovnik avodovnik requested a review from yury-s January 29, 2021 08:19
docs/src/api/class-elementhandle.md Outdated Show resolved Hide resolved
docs/src/api/class-elementhandle.md Outdated Show resolved Hide resolved
@yury-s yury-s merged commit dbcdf9d into microsoft:master Jan 29, 2021
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.

None yet

4 participants