* Upgrade feature-table icons to shoelace.
* Update client-src/elements/chromedash-feature-table.js
Co-authored-by: Kyle Ju <kyleju@google.com>
* Use material icons instead of bootstrap icons.
Co-authored-by: Kyle Ju <kyleju@google.com>
* Remove inline_file. Use external links for js/css
Refer to #2326 fo reasoning
Changes in this commit:
- Remove inline_file function
- For js: use script src=""
- Due to this change, there were some minor tweaks:
- change from VIEWS to global window.VIEWS in feature-page.js and features.html. This is so the external loaded feature-page.js can access the data loaded via templates. Before it was all inlined.
- For css: use link rel="stylesheet" href=""
- Add helper function "get_static_path" to get the path to the static folder
Part 1 of 2 to fix#2326
* Create helper function to avoid using global window
Create loadFeatureLegendViews to avoid having to change window.VIEWS
* Add version query parameter
* remove redundant get_static_path
* revert this change.
will fix this in the bigger testing PR when I will move the get_template_path function to the testing config.
It is not needed for the actual app. only needed for the unit tests
* Add cc field to features
Closes#2240. Similar implementation as editors.
Users who are cc'd on features can see unlisted features.
internals/core_models.py:
- Add new cc_recipients field. Defaults to empty list if field is not there.
internals/notifier.py
- Adds reason for being notified as a person in the cc_recipients field
internals/search.py
- Add the shorthand query for `cc:me`
internals/search_queries.py
- Add the ability to search the cc_recipients field by adding it to QUERIABLE_FIELDS
static/elements/chromedash-guide-metadata.js
- Add the ability to view the value on the metadata display
- Maps cc_recipients to individual mailto links ccRecipient
- Note: ccRecipient is camelCase
static/elements/form-field-specs.js
- Declare a new form field cc_recipients
static/elements/form-definition.js
- Add the cc_recipients field to the metadata form field
* cc_recipients changes to persist on create/update
These changes allow changes to cc_recipients to persist on feature
create or update
* Check if cc_recipients empty
cc_recipients can be missing from the object due to del_none
in core_models.py
Also fomat_for_template currently returns cc_recipients at a different level
and not inside the chrome object. As a result, need to change
the chromedash-guide-metadata file to look for the data at the right place.
* Use short hand CC instead of carbon copy
* Remove "remove spinner" code for SPA pages
* Share user data among multiple SPA pages
* minor changes for some unit tests
* Remove more TODOs
* Don't pass user object to the edit page
* Add location.reload() if no permission
* Migrate guide/stage page forms to JS
* Complete migration of forms to JS
* Move display field defs to JS and remove fielddefs API
* Fix line separation bug
* Filter out `['']` values due to the anticipated spec change field change
* Fix typo
* Change anticipated_spec_changes to regular textarea
* Refactor input form fields by specifying attributes
* Remove unsafeHTML and slots in chromedash-form-field
* Update the unit test and remove unused properties
* Fix hard-coded input field name for radios
* Render guide/edit form without unsafeHTML
* Update guide page unit tests
* no longer need to pass in overviewForm
* Refactor verify_accuracy page and migrate its form to js
* Remove unused code
* Resolve web test complaints
* Make changes based on changes from previous PR
* Refactor input form fields by specifying attributes
* Remove unsafeHTML and slots in chromedash-form-field
* Update the unit test and remove unused properties
* Fix hard-coded input field name for radios
* Render guide/edit form without unsafeHTML
* Update guide page unit tests
* no longer need to pass in overviewForm
* Register form submit handler via ref
* Resolve web test complaints
* Format feature for edit in JS
* show relative timestamp on safari and firefox
* show relative timestamp on safari and firefox
* update and add test
* Use local variable
* update tests
* Refactor input form fields by specifying attributes
* Remove unsafeHTML and slots in chromedash-form-field
* Update the unit test and remove unused properties
* Fix hard-coded input field name for radios
* renderField() -> renderWidgets()
* Only convert URLs to anchor tags
* fix tests
* no links test has single string
* syntax change
* comparing objects
* test with query strings
* fix strings