-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
🚀 [devdash] Render file list statically as placeholder #20600
Conversation
8ef5ebd
to
5e67f8c
Compare
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.
Super awesome you did this! Thank you so much! 😄
* limitations under the License. | ||
*/ | ||
|
||
const thru = a => a; |
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.
Can we have a more descriptive name for this? 😄
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.
Something like returnArguments
?
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.
It's pretty self-descriptive, no? It's only used in composition and it's not being exported.
* @return {string} | ||
* @template T | ||
*/ | ||
const many = (fragments, opt_renderer) => |
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.
Can we have a more descriptive name for this? 😄
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.
Something like, joinHtmlFragments
?
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.
Hmm, this is only used in the context of HTML fragments. If context is needed the export can be used by html = require('./html-helpers'), html.many(...)
. I would rather keep a succinct name.
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.
But yeah, might be too broad. Renamed to joinFragments
.
const {SettingsModal, SettingsOpenButton} = require('./settings'); | ||
|
||
const fileListEndpointPrefix = '/dashboard/api/listing'; | ||
|
||
const examplesPathRegex = /^\/examples\//; |
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.
Can we move these regex into its own file, or constants object? 🤔
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.
It's a little cluttered at the moment but I plan to split this file semantically. That way constants will retain meaning without being exported or cluttering.
const ampStateKey = (...keys) => keys.join('.'); | ||
|
||
const selectModeStateId = 'documentMode'; | ||
const selectModeStateKey = 'selectModePrefix'; |
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.
Same for these types of variables. Can they ben in a constants object? 😄
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.
Ditto as above.
build-system/app-index/template.js
Outdated
<script type="application/json"> | ||
{"src": "/dashboard/api/listing?path=${basepath}"} | ||
${JSON.stringify(state)} |
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.
Nice! 👍 😄
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.
Discussed offline, agreed that this requires some general cleanup. And will be done in a later PR. 😄
@@ -0,0 +1,106 @@ | |||
/** | |||
* Copyright 2018 The AMP HTML Authors. All Rights Reserved. |
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.
License Year 😄
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.
Whoops :)
) Prevents flash of unloaded content! Also: - automatically finds required AMP extensions in document string. - fixes a validation error for `amp-mustache`. Closes ampproject#19896.
) Prevents flash of unloaded content! Also: - automatically finds required AMP extensions in document string. - fixes a validation error for `amp-mustache`. Closes ampproject#19896.
Prevents flash of unloaded content!
Also:
amp-mustache
.Closes #19896.