Граф коммитов

962 Коммитов

Автор SHA1 Сообщение Дата
Kuan-Hsuan (Kevin) Shen cb67fd7883
Fix blink component form field (#2209)
* Fix blink component sl-select field

* Switch to datalist

* Empty the initial value of blink_components

* Fix unit test
2022-09-07 12:35:32 -04:00
Kuan-Hsuan (Kevin) Shen d0b954b880
Migrate more form definitions and render guide/verify_accuracy form without unsafeHTML (#2204)
* 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
2022-09-06 20:35:35 -04:00
Kuan-Hsuan (Kevin) Shen e57b38d072
Start migrating form definitions and render guide/edit form without unsafeHTML (#2201)
* 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
2022-09-05 17:58:01 -04:00
Daniel Smith f237efcb12
Show relative timestamp on Safari and Firefox (#2193)
* show relative timestamp on safari and firefox

* show relative timestamp on safari and firefox

* update and add test

* Use local variable

* update tests
2022-09-05 10:16:57 -07:00
Kuan-Hsuan (Kevin) Shen 10ca294463
Remove field and error unsafeHTMLs and add radios field type in `<chromedash-form-field>` (#2200)
* 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()
2022-09-02 17:45:39 -04:00
Jason Robbins 70c24eac03
Refactor <chromedash-activity> out of activity log. (#2197)
* Refactor <chromedash-activity> out of activity log.

* auto-formatting
2022-09-01 15:34:32 -07:00
Jason Robbins 0e19c21139
Autolink comment content. (#2196) 2022-09-01 10:51:19 -07:00
Kuan-Hsuan (Kevin) Shen 2b82273dca
Refactor input form fields by specifying attributes (#2199) 2022-09-01 11:55:27 -04:00
Jason Robbins 5b6575af22
Hack the layout of the checkbox to set impl status (#2198)
* Hack the layout of the checkbox to set impl status

* update tests
2022-09-01 08:07:47 -07:00
Kuan-Hsuan (Kevin) Shen 1661f3b1ce
Migrate textarea form fields to JS (#2191)
* Migrate textarea form fields to JS

* Correct typos
2022-08-31 19:47:40 -04:00
Jason Robbins d6bf46bc68
Refactor comment display into a new element. (#2185)
* Refactor comment display into a new element.

* Shift over some relevant styles.

* Add tests.   Anon cannot edit.

* JS naming convention

* Fix lint errors
2022-08-31 13:59:49 -07:00
Kuan-Hsuan (Kevin) Shen 64988335ba
Migrate the rest of none-textarea form fields to js (#2188)
* Populate blink components form field options via an API

* remove console.log

* Migrate the rest of none-textarea form field to js
2022-08-31 14:32:00 -04:00
Kuan-Hsuan (Kevin) Shen 984455c18c
Populate blink components form field options via an API (#2187)
* Populate blink components form field options via an API

* remove console.log

* Add missing spaces
2022-08-31 13:42:50 -04:00
Daniel Smith 2300079b6a
fix emails to not autolink (#2183) 2022-08-30 09:55:11 -07:00
Jason Robbins 63fafb4745
Fix passing user object from features.html to chromedash-featurelist. (#2182) 2022-08-29 15:20:52 -07:00
Daniel Smith 0c88540ead
Only convert URLs to anchor tags (autolinking) (#2178)
* Only convert URLs to anchor tags

* fix tests

* no links test has single string

* syntax change

* comparing objects

* test with query strings

* fix strings
2022-08-29 13:13:02 -07:00
Jason Robbins 8b6d34e76e
Fix 404 featurelist.css (#2177) 2022-08-26 17:09:56 -07:00
Jason Robbins 3b8c78c376
Fix approval row author comparison. (#2173) 2022-08-26 08:31:38 -07:00
Daniel Smith 1636632c75
Autolinking (#2167)
* autolinking copy over from monorail

* add tests and remove user email linking

* test changes

* more test updates

* new line fix

* string comparisons

* move autolink to separate file

* remove todo

* fix import

* Update package.json

* Update package-lock.json

* Revert "Update package-lock.json"

This reverts commit 12fd140595.

* Revert "Update package.json"

This reverts commit 8853ee9fff.

* revert last change from package.json
2022-08-25 16:53:12 -07:00
Jason Robbins f03ebaaae7
Change NEED_INFO to NEEDS_WORK. (#2170) 2022-08-25 10:58:57 -07:00
Daniel Smith 1ae2ad5d35
Comment log improvements (delete and undelete comments) (#2166)
* comment timestamps match monorail

* remove logs

* add tests and handle corner cases

* use shoelace component

* allow deleting and undeleting comments

* Changes based on @jrobbins review

* cleanup
2022-08-24 16:08:01 -07:00
Kuan-Hsuan (Kevin) Shen bd92897383
Convert guide/stage page into a component (#2163)
* Convert guide/stage page into a component

* Fix python unit test
2022-08-23 19:24:02 -04:00
Daniel Smith e5ce4473d9
Add relative time since comment creation to comment log (#2161)
* comment timestamps match monorail

* remove logs

* add tests and handle corner cases

* use shoelace component
2022-08-22 18:46:25 -07:00
Kuan-Hsuan (Kevin) Shen 0a9d05d368
Convert guide/verify_accuracy page into a component (#2147)
* Convert guide/verify_accuracy page into a component

* Add form_fields hidden input to verify and editall pages

* Correct form_field values and check them in tests

* fix `getFormFields()`
2022-08-22 20:41:12 -04:00
Daniel LaLiberte 56d8858957
Add extra help for feature name and summary. (#2149)
* Add extra help for feature name and summary.

* suggested changes
2022-08-22 13:35:59 -07:00
Kuan-Hsuan (Kevin) Shen af6d164208
Generate text, url, multi-email, and number inputs through JS (#2145)
* Migrate text input and url input

* Migrate multiemail and number inputs

* Make requested changes and fix missing initial value
2022-08-19 14:15:19 -04:00
Jason Robbins aa82824893
Use Shoelace elements in the approvals dialog (#2144)
* first try

* trying drawer instead

* Working layout

* Removed redundant cancel button

* Removed unneeded change

* Added requested comment
2022-08-19 10:46:11 -07:00
Jason Robbins fa68319bd5
Fix feature creation page category and feature_type fields. (#2143)
* Fix feature creation page category and feature_type fields.

* Addressed Kevins comments.
2022-08-17 19:48:34 -07:00
Kuan-Hsuan (Kevin) Shen f1270d3ad9
Merge part of main.scss into share.scss (#2140)
* Merge part of main.scss into share.scss

* Add a space to the end of shared.scss file
2022-08-17 12:32:34 -04:00
Kuan-Hsuan (Kevin) Shen 2058da81ed
Convert guide/editall page into a component (#2131)
* Convert guide/editall page into a component

* wrap up the unit test
2022-08-16 20:54:24 -04:00
Jason Robbins b3e16e5fb2
jslint whitespace changes to field enums. (#2133) 2022-08-16 10:16:01 -07:00
Daniel LaLiberte 501feb2cd9
Generate sl-select fields via chromedash-form-field.js (#2129)
* Adding changes to chromedash-form-field.js

* Changes to form-field-specs.js

* Add form-field-models.js

* Rename file and variable

* Improve comment
2022-08-16 09:12:19 -04:00
Kuan-Hsuan (Kevin) Shen 1ae5da72d4
Convert guide/edit page into a component (#2118)
* Remove guide.scss and convert edit page subheader

* Add progress API and convert rest of edit page

* Refine loading skeletons and unit tests
2022-08-15 12:04:36 -04:00
Kuan-Hsuan (Kevin) Shen 239422adf4
Handle form submission for forms in shadowDOMs (#2115) 2022-08-14 15:07:35 -04:00
Kuan-Hsuan (Kevin) Shen 7721e0f50a
Convert guide/metadata.html into a component (#2105) 2022-08-12 19:04:12 -04:00
Jason Robbins 9a813550c8
Register our form listener after shoelace. (#2107)
* Register our form listener after shoelace.

* Add TODO and bind()
2022-08-12 09:32:25 -07:00
Jason Robbins 411f9fe51c
Several small tweaks to accuracy verification (#2103) 2022-08-11 17:37:32 -07:00
Kuan-Hsuan (Kevin) Shen 11ec2b8a3e
Convert content in guide/new.html into a component (#2095)
* Convert content in guide/new.html into a component

* Move chromedash-form-field css back to form.scss

* Add unit test and additional style

* add a space
2022-08-11 14:11:35 -04:00
Jason Robbins c369ca8037
Fix JS lint warning. (#2098) 2022-08-10 16:37:44 -07:00
Daniel Smith 6cdddfa2e9
Add form for feature owners to verify feature data accuracy (#2090)
* Add accuracy verification page

* remove cron check and fix tests

* More tests added

* change text to match design doc

* fix tests and naming

* refactoring for clarity
2022-08-09 12:56:09 -04:00
Daniel LaLiberte d5038c021c
Replace django checkbox with chromedash-form-field generated checkbox field. (#2066)
* Replace django checkbox with chromedash-form-field generated checkbox field.

* Generate form table row for checkbox in django without the form field

* cleanup. remove unneeded test of 'Unlisted'

* Use light DOM for field and errors.

* Fix chromedash0form-field_test.

* More cleanups.

* Add test of "Unlisted" checkbox to chromedash-form-field_test.

* Remove unused form-controller.

* misc.

* Workarounds for set_stage and feature_type.
2022-08-03 19:07:34 -04:00
Jason Robbins 7866c63100
Sort pending reviews by review request date via sort= query string param (#2082)
* progress

* Finished and added python tests.

* removed commented-out code
2022-08-03 15:25:17 -07:00
Jason Robbins 24264a977c
Make icons more finger-friendly. (#2083) 2022-08-03 08:02:50 -07:00
Jason Robbins ea7485390c
Remove roadmap download links. (#2079) 2022-08-02 08:45:22 -07:00
Kuan-Hsuan (Kevin) Shen 0a921d8760
Fix SPA roadmap page and toast bugs (#2071)
* Fix SPA roadmap page bugs

* Move app-specific css to the app js file
2022-08-01 12:19:24 -07:00
Kuan-Hsuan (Kevin) Shen 4912f7810e
Enforce max-width to the stack rank search bar (#2067) 2022-07-27 15:07:26 -04:00
Kuan-Hsuan (Kevin) Shen 692a6cb3b6
Set up a partial SPA (#2059)
* Set up partial SPA at /spa route

* Remove console.log

* Fix header active page indicator for SPA

* Simplify SPA route rules

* remove header and banner slots in the app element

* Update variable name in _base.html

* Fix variable names and remove unnecessary block
2022-07-27 00:09:48 -04:00
Kuan-Hsuan (Kevin) Shen 36240bc8a4
Fix roadmap fetch bug in small views (#2065) 2022-07-26 21:23:12 -04:00
Daniel LaLiberte ead681c379
Migrate remaining labels to form-field-specs.js (#2060)
* Migrate remaining labels to form-field-specs.js

* Remove inline of schedule.css from subscribers.html. Remove test for labels in guideforms_test.py
2022-07-26 14:01:20 -04:00
Daniel LaLiberte 88a16563d8
Add support for displaying extra help (#2029)
* Add support for displaying extra help

* Move extra help to a new row, colspan=2.

* Use sl-icon-button with + and - icons.

* Cleanup, indent extra help

* Remove extra_help examples. more cleanups.
2022-07-22 15:44:06 -04:00
Kuan-Hsuan (Kevin) Shen c1a4eae155
Remove unused styles (#2058) 2022-07-22 11:41:44 -04:00
Jason Robbins a9a12ec825
Clarify in the UI that samples can be "demos and samples". (#2057) 2022-07-22 08:29:13 -07:00
Kuan-Hsuan (Kevin) Shen 5f9d2f501c
Make the loading skeleton sheen contrast higher (#2056) 2022-07-21 12:31:51 -04:00
Kuan-Hsuan (Kevin) Shen d2f4610cc3
Convert new-feature-list to all-features-page (#2054) 2022-07-20 14:35:24 -04:00
Kuan-Hsuan (Kevin) Shen e06be0857d
More UI changes to stack rank and timeline pages (#2053)
* More UI changes to stack rank and timeline pages

* Update timeline page subtitle

* Remove an unnecessary empty line
2022-07-20 14:12:35 -04:00
Kuan-Hsuan (Kevin) Shen 34cc70715b
Make content width larger (#2044) 2022-07-19 16:35:01 -04:00
Kuan-Hsuan (Kevin) Shen 4ddbea9437
Fix My Features table width (#2043) 2022-07-19 16:24:38 -04:00
Kuan-Hsuan (Kevin) Shen 546e31025a
Add loading skeletons for loading roadmap cards (#2035)
* Add loading skeletons for loading roadmap cards

* Show loading cards for default channels

* Adjust import and class definition blank line styles
2022-07-19 16:16:12 -04:00
Jason Robbins f18d62e830
Add index that datastore says it needs for can_edit terms. (#2033) 2022-07-15 14:18:25 -07:00
Jason Robbins b2fc780556
Fix editable_features reference. (#2032) 2022-07-15 13:32:33 -07:00
Kuan-Hsuan (Kevin) Shen 016f8699a1
Stack rank page UI refactor (#2023)
* Stack rank UI refactor

* Add renderStackRankList

* Remove unneeded tabindex & make x-meter clickable
2022-07-15 13:23:32 -04:00
Jason Robbins badbc97dad
Move the new feature button to the heading. (#2022)
* Move the new feature button to the heading.

* remove unusedmedia query
2022-07-15 09:57:12 -07:00
Daniel LaLiberte c83e08a912
Start migrating form field labels to form-field-specs.js (#2024)
* Workaround conflict with Shoelace event listeners.

* Start migrating form field labels to form-field-specs.js

* (stage all the changes)

* Inline use of fieldProps.label
2022-07-14 19:57:30 -04:00
Kuan-Hsuan (Kevin) Shen d75df5722e
Add chromedash-metrics-page (#2018)
* Add chromedash-metrics-page

* Separate stack-rank and timeline pages

* Separate CSS and JS renderNavBar
2022-07-14 12:46:47 -04:00
Daniel Smith 83e77b9d5b
New permissions system implementation (#2011)
* Check edit permissions by individual feature

* update logic to check permissions

* editors field added

* editors can see edit access in UI

* myfeatures shows editable features

* Make editor field plural

* 1 more plural update

* change var name for site editor

* Editors can delete a feature

* Site editors can now be designated in admin ui

* fix existing tests to work with new changes

* feature and permissions tests

* accounts and models test

* new creator field

* update tests for creator field

* code cleanup

* add creator field to new feature

* unlisted features are displayed in "My Features"

If the user is the creator, an owner, or an editor.

* slight update in unlisted features logic

* My features displays all editable features

in a single dropdown.

* fix web tests

* add test to ensure creator can edit feature

* remove unused _reject_or_proceed() change

* remove mangle and log statement

* Set original permissions

All changes to permissions.py removed.
This commit can be reverted to enable to new permissions system.

* changes suggested by @jrobbins

* update from merge

* remove creator field for later implementation

* changes suggested by @jrobbins
2022-07-13 14:31:27 -07:00
Daniel LaLiberte d18e4f172a
Migrate remaining help_text to form-field-specs.js. (#2007)
* Migrate remainin help_text to form-field-specs.js.

* Remove test for "help" slot in chromedash-form-field_test.js

* Update help text consistent with #2015.

* Updates/corrections from Jason.

* Change placeholder "Milestone #" to "Milestone number"
2022-07-12 13:53:24 -04:00
Kuan-Hsuan (Kevin) Shen 89e61d41cd
Remove the drawer and center-align all pages (#2010)
* Center-align all pages and remove the drawer

* Switch to horizontal nav bar at 1100px
2022-07-12 00:19:02 -04:00
Kuan-Hsuan (Kevin) Shen bf8c565d5a
Convert header into a component (#2004)
* Convert header into a component

* wraps current page validation into a method
2022-07-11 23:36:58 -04:00
Daniel LaLiberte 1b142660f5
Constrain width of form field column. (#2005) 2022-07-07 22:39:45 -04:00
Jason Robbins b426b3db8e
Only show inactive feature statuses in the title. (#2006) 2022-07-07 14:34:22 -07:00
Daniel LaLiberte b4ad8c0b41
Migrate more help text (#2001) 2022-07-07 16:35:17 -04:00
Jason Robbins 6792436c66
Remove a missed reference to chromedash-checkbox. (#2003) 2022-07-07 13:12:45 -07:00
Jason Robbins 30b57c32bc
Label checkboxes via django template. (#2002) 2022-07-07 12:12:37 -07:00
Kuan-Hsuan (Kevin) Shen 0597cfd6a8
Convert footer into a component (#1997)
* Convert footer into a component

* Add footer unit test

* Move footer styles into its component

* Add footer-spacer
2022-07-06 11:56:19 -04:00
Kuan-Hsuan (Kevin) Shen 15a582228b
Add settings API and settings page component (#1993)
* Add settings API and settings page component

* Fix lint error
2022-07-05 17:38:02 -04:00
Kuan-Hsuan (Kevin) Shen 2d482452e6
Pass in entire feature for `openApprovalDialog` (#1992) 2022-07-02 15:15:48 -04:00
Kuan-Hsuan (Kevin) Shen 79121f6784
Create approval dialog element on demand (#1991) 2022-07-01 23:04:35 -04:00
Kuan-Hsuan (Kevin) Shen a01e12b2f0
Convert roadmap page into a single Lit element (#1988)
* Add roadmap-page and do roadmap refactor

* Add unit test for roadmap-page

* Update variable names and createRef for <section>
2022-07-01 22:55:41 -04:00
Daniel LaLiberte e6f8094754
Move help text from django form field specifications into chromedash-form-field (#1990)
* Add name attribute to each chromedash-form-field. Use to look up help text.

* Move help_text for all new and metadata fields.

* Clean up and add comments.
2022-07-01 22:49:07 -04:00
Jason Robbins 8a9f86ef5e
Simply local setup steps. (#1987) 2022-06-30 17:45:02 -07:00
Jason Robbins a1db9e2e6a
Implement search result paginaton in the server-side internals. (#1984) 2022-06-30 10:41:37 -07:00
Jason Robbins 6d46d792bd
Try skeletons on feature detail page. (#1985) 2022-06-30 10:12:24 -07:00
Daniel LaLiberte 20236d5f11
Add chromedash-form-table and -form-field and use for all feature field forms (#1981)
* Add chromedash-form-table and -form-field and use for all form table and field rows.

* Display error text before form field, as it used to.

* Add minimal tests for -form-table and -form-field.

* Add unit tests. Delete commented code.

* Remove unused variables in utils.js

* Undelete showToastMessage and openApprovalsDialog.
2022-06-29 23:58:08 -04:00
Kuan-Hsuan (Kevin) Shen 714b7ff9f7
Convert My Features page into a single component page (#1976)
* Rename myfeatures to myfeatures-page

* Add myfeatures page tests and refine related elements

* Add toast util method and add component imports

* Fix unit test errors

* Fix ApprovalsDialog
2022-06-29 19:17:56 -04:00
Kuan-Hsuan (Kevin) Shen 72c412765b
Make the footer sticky on every page (#1982)
* Move footer css to main.scss

* Add consistent margin-bottom for the sticky footer
2022-06-28 11:58:48 -04:00
Daniel LaLiberte 476ee36d77
Change the guide form field layout for all tables (#1965)
* Change the guide form field layout for all tables

* Updates following comments

* Add chromedash-checkbox, just so we can use the label attribute.

* Add missing option close tag: <option></option>
2022-06-25 16:57:58 -04:00
Kuan-Hsuan (Kevin) Shen 40f7323144
Add permissions API and move all feature content and js scripts into feature-page component (#1972)
* Add process and fieldDefs APIs and move components

* Add processes, cues, fielddefs tests

* Fix typos

* Add `permissions_api` and clean up `feature.html`

* Add permissions_api test and improve feature page test

* Change TODOs, rename test response variables
2022-06-25 10:54:02 -04:00
Kuan-Hsuan (Kevin) Shen ae669d7159
Add `do_get` for `processes_api`, `fielddefs_api`, and `cues_api` (#1970)
* Add process and fieldDefs APIs and move components

* Add processes, cues, fielddefs tests

* Fix typos

* change the process route and function names
2022-06-24 19:34:24 -04:00
Jason Robbins 430a20affe
Avoid a lint error on datatlist options. (#1964) 2022-06-22 18:08:41 -07:00
Kuan-Hsuan (Kevin) Shen 03c1b0efad
Convert part of feature template to a new element (#1937)
* Add chromedash-feature-page element

* Add spinner and move styles into page component

* Add autolinks and add js unit tests

* Fix summary autolink

* Add `sinon` and complete feature-page js test

* Update package-lock.json to include `sinon`

* Update package-lock.json to include `sinon`

* Fix css format, move `sinon` to devDep

* Fix feature page bugs

* Move Promise definitions into test body

Co-authored-by: kevinshen56714 <kevinshen56714@hotmail.com.tw>
2022-06-22 13:20:56 -04:00
Daniel LaLiberte 539534bce7
Revert "Add chromedash-select to fix sl-select bug (#1944)" (#1963)
This reverts commit a5c33851c5.
2022-06-21 20:29:02 -04:00
Daniel LaLiberte ea3e8beb0f
Form cleanups (focus for radio buttons, extra br) (#1960)
* Misc changes in the works.

* Add workaround for missing focus style on radio buttons.

* Remove use of sl-radio.

* Clarify comment about sl-radio.
2022-06-21 12:53:21 -04:00
Jason Robbins 8dbb07b9ab
Eliminate reliance on unpkg.com. (#1949)
* Eliminate reliance on unpkg.com.

* Remove unused reference to _base_embed.html
2022-06-17 18:38:37 -07:00
Daniel LaLiberte a5c33851c5
Add chromedash-select to fix sl-select bug (#1944)
* Add chromedash-select to fix sl-select bug

* Add TODO about removing the subclass after shoelace deploys the fix.
2022-06-16 14:36:38 -04:00
Jason Robbins 43346ee68d
Avoid scrolling to top when opening approvals dialog. (#1941) 2022-06-15 17:24:33 -07:00
Daniel LaLiberte 178d0acb81
Replace select and option with sl-select and sl-menu-item (#1934)
* Replace select and option with sl-select and sl-menu-item

* Hide sl-select until defined.  Hide br after sl- form fields.
2022-06-14 17:56:51 -04:00
Jason Robbins 24775a4422
Fix checkboxes and disabled input autocomplete. (#1928)
* Fix checkboxes and disabled input autocomplete.

* Add autocomplete="off" in python to fix failing unit test.
2022-06-13 15:25:37 -07:00
Jason Robbins 487ae921fe Whitespace only changes from lint-fix. 2022-06-13 17:01:55 +00:00
Daniel LaLiberte 104ad2943d
Define and use chromedash-textarea. Use sl-input. (#1921)
* Define and use chromedash-textarea.  Use sl-input.

* Fix problems. Use setCustomValidity() as intended.

* Add tests of valid and invalid input.

* Add missing newline and remove extra space.
2022-06-12 15:47:13 -04:00
Daniel LaLiberte f29d25f378
Fix bolding in various places (#1894)
* Fix bolding in various places

* Make "Feature type:" bold on "new" feature page.
2022-05-19 20:00:03 -04:00