Hi Simon,
This moves the SurveyLink documentation. It relies on some environment setups, so I'm adding a script to setup/cleanup the environment. PTAL!
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
I'm not sure about this CL TBH, IIUC components should be light-weight with no deps on the backend. But this looks like we want to make it work for full presenters which will pull in all of DevTools?
deps = [ ":bundle" ]missing deps on `common:bundle`.
ts_library("docs_environment") {We could turn this into an `devtoosl_entrypoint` instead. Then you are guaranteed a single bundled output file.
deps = [ "../../front_end/testing" ]FYI, this pulls in nearly all of DevTools. `testing` has a dependency on a lot of major `:meta` targets, which kind of gets you everything :(
@bme...@chromium.org Do you know why "testing" has a dependency on meta targets?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
I'm not sure about this CL TBH, IIUC components should be light-weight with no deps on the backend. But this looks like we want to make it work for full presenters which will pull in all of DevTools?
Yeah, I know what you mean, I tried to workaround a few things at first by just setting it up minimally, and not depending on `testing`. SurveyLink itself only relies on Locale, but then later components (ContextMenu, Snackbar) rely on the `InspectorView` which pulls in a lot of other requirements. I figured, this is not the exact time to resolve these dependencies and make them lightweight (while this is a goal for UIKit, it's not directly related to the documentation set up), so I fell back to doing what we did earlier (in the component server) too, i.e. including `testing`.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Thanks Simon, for the review. I have addressed the comments now. I could, in theory, only take care of the locales here and set them up without pulling in testing, but we will run into this issue for a later doc, where more setups are required. I can try to find a workaround, but components nowadays unfortunately aren't so leightweight as we'd like them to be.
missing deps on `common:bundle`.
Done
We could turn this into an `devtoosl_entrypoint` instead. Then you are guaranteed a single bundled output file.
Makes sense! Done, and TIL.
"../../front_end/core/i18n/locales",I needed to add this here for having en-US.json (noticed that the dedicated component_docs build fails without it).
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Kim-Anh TranI'm not sure about this CL TBH, IIUC components should be light-weight with no deps on the backend. But this looks like we want to make it work for full presenters which will pull in all of DevTools?
Yeah, I know what you mean, I tried to workaround a few things at first by just setting it up minimally, and not depending on `testing`. SurveyLink itself only relies on Locale, but then later components (ContextMenu, Snackbar) rely on the `InspectorView` which pulls in a lot of other requirements. I figured, this is not the exact time to resolve these dependencies and make them lightweight (while this is a goal for UIKit, it's not directly related to the documentation set up), so I fell back to doing what we did earlier (in the component server) too, i.e. including `testing`.
Ack. I think we should move into a direction though where these don't pull in all those deps. It might also make those components more testable and re-usable if they don't depend on core DevTools things.
FYI, this pulls in nearly all of DevTools. `testing` has a dependency on a lot of major `:meta` targets, which kind of gets you everything :(
@bme...@chromium.org Do you know why "testing" has a dependency on meta targets?
We should look into this as a follow-up, ideally test things don't rely on side-effect stuff from "-meta.ts" files.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Kim-Anh TranI'm not sure about this CL TBH, IIUC components should be light-weight with no deps on the backend. But this looks like we want to make it work for full presenters which will pull in all of DevTools?
Simon ZündYeah, I know what you mean, I tried to workaround a few things at first by just setting it up minimally, and not depending on `testing`. SurveyLink itself only relies on Locale, but then later components (ContextMenu, Snackbar) rely on the `InspectorView` which pulls in a lot of other requirements. I figured, this is not the exact time to resolve these dependencies and make them lightweight (while this is a goal for UIKit, it's not directly related to the documentation set up), so I fell back to doing what we did earlier (in the component server) too, i.e. including `testing`.
Ack. I think we should move into a direction though where these don't pull in all those deps. It might also make those components more testable and re-usable if they don't depend on core DevTools things.
+1. In the design doc (https://docs.google.com/document/d/1tVT1juhCpoVTiM58T8ZB-aziTPHNTMSTxDR3y93Mztg/edit?tab=t.0#bookmark=id.vx9ti1alkg21) we explicitly mention that one goal is to make the component module self sufficient.
Thanks for the help and review, Simon!
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
9 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: scripts/component_docs/BUILD.gn
Insertions: 3, Deletions: 5.
@@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-import("../../scripts/build/ninja/devtools_entrypoint.gni")
+import("../../scripts/build/typescript/typescript.gni")
import("../build/ninja/copy.gni")
import("../build/ninja/node.gni")
@@ -18,10 +18,9 @@
rebase = target_gen_dir
}
-devtools_entrypoint("docs_environment") {
- entrypoint = "docs_environment.ts"
+ts_library("docs_environment") {
+ sources = [ "docs_environment.ts" ]
deps = [ "../../front_end/testing" ]
- visibility = [ ":*" ]
}
node_action("component_docs") {
@@ -30,7 +29,6 @@
":component_docs_sources",
":copy_styles",
":docs_environment",
- "../../front_end/core/i18n/locales",
]
metadata_file = "$target_gen_dir/component_docs_sources.json"
```
[docs] Migrate SurveyLink component documentation to static page
SurveyLink requires the locale to be set up. Add a
"docs_environment.ts" script to be included for environment setup.
Upcoming docs also need other set ups, so directly use
`initializeGlobalVars`/`deinitializeGlobalVars`.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |