-
Notifications
You must be signed in to change notification settings - Fork 15
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
Refactor the field docs #193
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #193 +/- ##
==========================================
+ Coverage 98.44% 98.46% +0.02%
==========================================
Files 30 31 +1
Lines 1414 1437 +23
==========================================
+ Hits 1392 1415 +23
Misses 22 22 |
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.
Looking much more organized! ✨
@@ -24,11 +25,60 @@ class. For example: | |||
Because itemadapter_ allows implementing support for arbitrary classes, | |||
any kind of Python object can potentially work as an item. | |||
|
|||
Defining the item class of a page object class | |||
============================================== |
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.
👍 for moving/adding these docs here
docs/page-objects/fields.rst
Outdated
A field is a read-only property in a :ref:`page object class <page-objects>` | ||
that is decorated with :meth:`@field <web_poet.fields.field>`, is named after a | ||
key of the :ref:`item <items>` that the page object class returns, and returns | ||
the value for that item key based on :ref:`inputs <inputs>`. |
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 found this paragraph a bit hard to read. I guess it starts with "..a read-only property in a page-objects
that is decorated with..", where it's not immediately clear if a property is decorated, or a page object is decorated, or if you should use Python's @property
(which must be read-only), and decorate it with @field
.
Would it be possible to re-phrase it? Using bullet points instead of many commas may also help.
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.
What about 1b81268?
Looks good overall! |
Thanks @Gallaecio! |
No description provided.