Closed Bug 1404769 Opened 7 years ago Closed 6 years ago

[Form Autofill] The documentation of the architecture and parser in FormAutofillHeuristics

Categories

(Toolkit :: Form Autofill, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla59
Tracking Status
firefox59 --- fixed

People

(Reporter: selee, Assigned: selee)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [form autofill])

Attachments

(1 file)

The basic ideas of the documention:
1. The usage of `FieldScanner`. This is a set of utilities to implement a parser.
2. The detail idea of each parser.
    * Phone parser - intertesting types: tel* fields
    * Address parser - intertesting types: address-line[1-3]
    * Credit Card Expire date parser - cc-exp*
3. The detail of regexps - How to apply each regexp to `id`, `name`, and the label strings of an input or select element.
4. API dependency - element.getAutocompleteInfo(), etc.
Priority: -- → P3
Whiteboard: [form autofill]
Hi MattN,

I know the draft is not ready for review :P, could you take a look the structure of FormAutofillHeuristics documentation first?
I guess there would be some sections worth to be added.

Another part is the arrangement of the files. If we would like to write the documentation of all Form Autofill modules in one file, I guess it should be placed in `browser/extensions/formautofill/docs/index.rst`. The section arrangement should be considered again.

If we would like to write the documentation in each file for each module, the heuristics one is placed in `browser/extensions/formautofill/docs/heuristics/index.rst` in my patch. The path can be changed if needed.
Component: Form Manager → Form Autofill
Comment on attachment 8925835 [details]
Bug 1404769 - The documentation of FormAutofill feature and FormAutofillHeuristics module.

https://reviewboard.mozilla.org/r/197030/#review204268

::: browser/extensions/formautofill/docs/heuristics/index.rst:1
(Diff revision 3)
> +========================

As discussed in our meeting, I think most autofill docs can go directly in browser/extensions/formautofill/docs/ but if we plan to have many for heuristics and don't just want to put them adjacent there then a directory makes sense.

::: browser/extensions/formautofill/docs/heuristics/index.rst:10
(Diff revision 3)
> +Form Autofill Heuristics module is for detecting the field type based on `autocomplete attribute <https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill/>`_, `the regular expressions <http://searchfox.org/mozilla-central/source/browser/extensions/formautofill/content/heuristicsRegexp.js/>`_ and the customized logic in each parser.
> +
> +Debugging
> +=========
> +
> +Set the pref ``extensions.formautofill.loglevel`` to "Debug".

Ideally this line would be in formautofill/docs/index.rst
Attachment #8925835 - Flags: review?(MattN+bmo) → review+
Comment on attachment 8925835 [details]
Bug 1404769 - The documentation of FormAutofill feature and FormAutofillHeuristics module.

https://reviewboard.mozilla.org/r/197030/#review204268

> As discussed in our meeting, I think most autofill docs can go directly in browser/extensions/formautofill/docs/ but if we plan to have many for heuristics and don't just want to put them adjacent there then a directory makes sense.

The folder structure is removed, so there are two docs files now.
BTW, `SPHINX_TREES['docs'] = 'docs'` is added to `browser/extensions/formautofill/moz.build`.
Thanks for the review.
Keywords: checkin-needed
Pushed by csabou@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/41a40a4edb54
The documentation of FormAutofill feature and FormAutofillHeuristics module. r=MattN
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/41a40a4edb54
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
Blocks: 1386923
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: