Skip to content

📖 protocol adapters: adds documentation#29603

Merged
samouri merged 15 commits intoampproject:masterfrom
samouri:fns-list-docs
Aug 14, 2020
Merged

📖 protocol adapters: adds documentation#29603
samouri merged 15 commits intoampproject:masterfrom
samouri:fns-list-docs

Conversation

@samouri
Copy link
Member

@samouri samouri commented Jul 30, 2020

Followup to #29541

I plan on holding off on merging this until the experiment is turned on.

@samouri samouri self-assigned this Jul 30, 2020
@google-cla google-cla bot added the cla: yes label Jul 30, 2020
@google-cla google-cla bot added the cla: yes label Jul 30, 2020
@samouri samouri changed the title 📖 protocol adapters: update documentation 📖 protocol adapters: adds documentation Jul 30, 2020
@samouri samouri requested review from dreamofabear and morsssss July 31, 2020 15:36
@samouri samouri marked this pull request as ready for review July 31, 2020 15:36
@samouri samouri force-pushed the fns-list-docs branch 2 times, most recently from 0275b62 to 71f7b0d Compare August 3, 2020 14:34
Copy link

@dreamofabear dreamofabear left a comment

Choose a reason for hiding this comment

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

Looks fine but I think (1) the prose can be more concise to match the style of technical documentation and (2) could use some proofreading. @CrystalOnScript might have some good refs.


1. **https**: This must refer to a CORS HTTP service. Insecure http is not supported.
2. **amp-state**: This is for initializing from amp-state data. See [Initialization from amp-state](#initialization-from-amp-state) for more details.
3. **amp-script**: Enables using `<amp-script>` functions as the data source. See [Using amp-script as a data source](#using-amp-script-as-a-data-source) for more details.

Choose a reason for hiding this comment

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

Nit: amp-state vs. <amp-script> is inconsistent.

Copy link
Contributor

Choose a reason for hiding this comment

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

I've never figured out what we prefer in documentation. I tend to use angle brackets, but not everyone does. @CrystalOnScript , is there a standard?

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, looking at this again - can you restate "this is for initializing from amp-state data" more clearly?

Copy link
Contributor

@morsssss morsssss left a comment

Choose a reason for hiding this comment

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

Thanks for writing all this documentation! I'm excited about this. I just think some things need one more draft. (Writing is hard...)

See below for an example:

```html
<amp-script id="fns" script="local-script" nodom></amp-script>
Copy link
Contributor

Choose a reason for hiding this comment

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

why is the id "fns"?

Copy link
Member Author

@samouri samouri Aug 5, 2020

Choose a reason for hiding this comment

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

The id is arbitrary. It just needs to match what ends up going in the src of the <amp-list>'s src

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you choose something more descriptive than "fns"?

(I imagine it's short for "functions", but even more descriptive than that would be great)

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure if you are thinking it should be named by its contents or in a more meta way. E.g. either script-getRemoteData, or exported-functions.

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 something descriptive would be best. Like dataFunctions, apiShim, etc.


1. **https**: This must refer to a CORS HTTP service. Insecure http is not supported.
2. **amp-state**: This is for initializing from amp-state data. See [Initialization from amp-state](#initialization-from-amp-state) for more details.
3. **amp-script**: Enables using `<amp-script>` functions as the data source. See [Using amp-script as a data source](#using-amp-script-as-a-data-source) for more details.
Copy link
Contributor

Choose a reason for hiding this comment

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

I've never figured out what we prefer in documentation. I tend to use angle brackets, but not everyone does. @CrystalOnScript , is there a standard?

@dreamofabear
Copy link

FYI I think documentation rollout on amp.dev follows our release schedule, so no need to wait before merge.

Copy link
Contributor

@morsssss morsssss left a comment

Choose a reason for hiding this comment

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

only spotted two things, one which is a teeny nit, and one which will matter!

Copy link
Contributor

@morsssss morsssss left a comment

Choose a reason for hiding this comment

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

Thanks for all your work on the documentation! I'm pretty excited about this feature, and I know I'm not the only one.

@samouri samouri merged commit 28f75c8 into ampproject:master Aug 14, 2020
@samouri samouri deleted the fns-list-docs branch August 14, 2020 16:14
ed-bird pushed a commit to ed-bird/amphtml that referenced this pull request Dec 10, 2020
* protocol adapters: update documentation

* amp-script docs

* typo

* update docs

* document nodom

* morning cleanup

* gulp prettify --fix

* fix merge conflict

* address feedback

* period word

* remove more words and linkify

* typo

* nit HTTP

* some more small updates

* morrrsssss updates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants