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

245 Коммитов

Автор SHA1 Сообщение Дата
Daniel Smith 4ddb5bc7af
Feature accuracy verification handles multiple stages of the same type (#2827)
* update accuracy verification for multiple stages

* Update guide.py to only change fields in form

* fix touched tests

* changes suggested by @jrobbins
2023-03-16 12:32:42 -07:00
Jason Robbins 21f6ab692f
Comment out privacy and security gates until we get questionnaires. (#2830) 2023-03-15 11:40:28 -07:00
Daniel Smith 8b6b888f71
Move legacy Feature helpers and converters to separate file (#2819)
* move legacy helpers and converters

* Move legacy tests to separate file
2023-03-13 15:07:55 -07:00
Jason Robbins e4555b8056
Enable all gates and add reviewers. (#2806)
* Enable all gates and add reviewers.

* Update approval_defs.py

Add type annotation

* Update core_enums.py

There's no need for all the reviews when shipping something that is just a code change.
2023-03-09 14:07:55 -08:00
Yann Dago 61e6885473
Add Enterprise feature flow UI/UX changes (#2802)
* Hide edit button on feature page for enterprises
* After creating an enterprise feature go to the edit all page at the first rollout section
* Open all section on the feature page for enterprise by default
* Adding stage for enterprise features only adds rollout feature
* Remove the action of setting a stage in enterprise features
* Update scrolling behavior to scroll to the element from the hash if no form field is found
* Remove the edit icon from the feature page that navigates to the edit page
* Add an id to the "edit all" section headers to serve as an anchor for navigations
2023-03-09 16:18:20 -05:00
Jason Robbins ff2ab3ab77
Add adoption fields to intent template. (#2805) 2023-03-08 17:08:49 -08:00
Jason Robbins faf3499262
Convert Adoption gate questionnaire into fields. (#2803) 2023-03-08 16:13:26 -08:00
Daniel Smith b7ffb7a501
Move Feature to legacy models file (#2798) 2023-03-07 10:30:17 -08:00
Jason Robbins ed6d599f08
Comment out debuggability for now. (#2788) 2023-03-02 16:38:02 -08:00
Yann Dago ae90f406c5
Create new flow for creating enterprise features (#2775)
Remove the enterprise feature choice when creating a new feature.

Make enterprise feature creation accessible via url only.

Ensure only the enterprise fields are shown on the feature, edit and edit all pages for enterprise features.
2023-03-01 11:12:45 -05:00
Kyle Ju 74df7bea35
Add default mailing list for devrel (#2773)
* Add default mailing list for devrel

* Move email address to guide.py

---------

Co-authored-by: Kyle Ju <kyleju@chromium.org>
2023-02-24 11:23:39 -08:00
Jason Robbins b3da149951
Do not add gates for new teams until we know approvers. (#2722) 2023-02-03 11:13:20 -08:00
Jason Robbins 8e147a4e21
Add gates for enterprise, debuggability, testing, and adoption. (#2701) 2023-01-30 12:32:39 -08:00
Daniel Smith 820bb801dc
Add trial extensions (#2656)
* trial extensions displayed and edited with trials

* edit extension info on editall

Also, display trial info on detail page

* thorough commenting

* concat stageIds

* Add corner case cover

Display only extension info if it exists but the original trial extension information does not.

* Allow users to create trial extension stages

* fix test

* fix gates in test

* remove extension fields from dep trial stage
2023-01-12 12:35:10 -08:00
Daniel Smith 034eec4825
Support for multiple trial extension stages (#2655)
* trial extensions displayed and edited with trials

* edit extension info on editall

Also, display trial info on detail page

* thorough commenting

* concat stageIds

* Add corner case cover

Display only extension info if it exists but the original trial extension information does not.
2023-01-11 13:27:44 -08:00
Daniel Smith 3d18ef0020
prototype stage editing (#2629) 2023-01-06 12:59:33 -08:00
Daniel Smith 7ee39ccf88
make trial extension fields editable (#2624) 2023-01-05 16:02:13 -08:00
Daniel Smith 8470308481
View and edit stage-specific data on edit_all page (#2562)
* display and edit stages based on stage ID

* fix test

* defensive coding with intent stages

* new routes

* save active_stage_id in guide.py

This change is set to land in a separate PR.

* display active stage on detail page correctly

* Save to specific stage IDs when using edit_all

* remove log

* remove "SHIPPED" stage types

* fix processes and tests

* add shipped form field to shipping form field

* Show matching process stages on process overview

* fix tests

* remove active_stage_id reference

* remove active_stage_id from test

* typo

* update url

* fix web test

* Consolidate "prepare to ship" and "ship"

* add small comment

* organize guide.py

* one process stage per stage entity

* style fix

* form_fields value given as a string

* remove duplicated function

* clear up logic for writing to stages

* backwards-compatible urls and api

* Update tests

* fix merge conflict block removal

* changes suggested by @jrobbins
2022-12-22 11:02:45 -08:00
Daniel Smith cc3a46fa92
Use specific stage data for viewing and editing feature data (#2561)
* display and edit stages based on stage ID

* fix test

* defensive coding with intent stages

* new routes

* save active_stage_id in guide.py

This change is set to land in a separate PR.

* display active stage on detail page correctly

* remove "SHIPPED" stage types

* fix processes and tests

* add shipped form field to shipping form field

* Show matching process stages on process overview

* fix tests

* remove active_stage_id reference

* remove active_stage_id from test

* typo

* update url

* fix web test

* Consolidate "prepare to ship" and "ship"

* add small comment

* remove duplicated function

* clear up logic for writing to stages

* backwards-compatible urls and api

* Update tests
2022-12-20 10:07:18 -08:00
Daniel Smith 79d397eefc
Use active_stage_id to display active on detail page (#2557)
* Use active_stage_id to display active on detail pg

* match stage ID only to determine active stage
2022-12-19 13:48:32 -08:00
Daniel Smith cb99420597
remove "SHIPPED" stage types (#2569)
* remove "SHIPPED" stage types

* fix processes and tests

* add shipped form field to shipping form field

* Show matching process stages on process overview

* fix tests

* remove active_stage_id reference

* remove active_stage_id from test

* typo

* Use utils method for finding process stage

* Add function argument
2022-12-19 13:48:12 -08:00
Kyle Ju 9001b06bdf
Add /newfeatures page rollout banner (#2580)
* Add rollout banner

* test template

Co-authored-by: Kyle Ju <kyleju@chromium.org>
2022-12-14 11:31:36 -08:00
Daniel Smith aedf07f6e6
Add new enums to help support multiple stages (#2543)
* Add new enums to help support multiple stages

* fix test

* remove revised enum
2022-12-05 16:46:26 -08:00
Daniel Smith fd941f1ded
blink_components guide update bug fix (#2534) 2022-12-01 15:37:15 -08:00
Daniel Smith b5d8839036
Remove bad input from rollout_platforms (#2526)
* remove bad input from rollout_platforms

* clearer comparison
2022-12-01 13:30:11 -08:00
Jason Robbins 5edf02f4ab
Make pending review and recent review queries use Gate.state (#2515)
* Progress

* partly fixed tests

* Updated unit tests

* Put back old search specs for open SPA tabs.

* Added some more indexes that NDB says are needed

* Add indexes needed by NDB
2022-11-29 15:06:38 -08:00
Jason Robbins b0ac9d8339
Allow the user to clear out a multi-select field. (#2500) 2022-11-23 13:12:04 -08:00
Yann Dago b465758c63
Add enterprise feature and breaking change support (#2482)
* Add enterprise feature and breaking change support

* jcsotti review comments

* jrobbins review comments

* Fix tests

* jcsotti comments: Add tests

* Add enterprise feature and breaking change support

* jcsotti review comments

* jrobbins review comments

* Fix tests

* jcsotti comments: Add tests

* jcsotti comments: Add tests

* Fix CI

* Fix CI

* Add type checking
2022-11-22 14:09:59 -08:00
Jason Robbins 5519378017
Add edit buttons to the feature detail page (#2488)
* Half done

* More like the mocks

* Add contextual navigation to next page, and edit-all button

* Only show edit-all if canEdit
2022-11-18 16:52:39 -08:00
Daniel Smith 671b23a704
Use FeatureEntry entities for "All Features" page (#2469)
* Use FeatureEntry for displaying all features list

* remove TODO

* update testing for new function

* Update comments
2022-11-16 15:28:17 -08:00
Daniel Smith d5ba6dc59a
Reference feature stages as possibly plural (#2478)
* Reference feature stages as possibly plural

* update tests

* Check that milestones is not null first

* extra line
2022-11-15 15:34:09 -08:00
Jason Robbins 429f4c3214
Fix editing of unlisted checkbox on metadata form. (#2479) 2022-11-15 13:23:07 -08:00
Daniel Smith 2bb1b3ba23
typo fix (#2465) 2022-11-10 12:03:56 -08:00
Daniel Smith 3141ef5005
FeatureEntry edit bug fix (#2461)
* handle emails and use new field names

* rearrange if statement fields
2022-11-09 14:06:42 -08:00
Daniel Smith 87655651e9
Use FeatureEntry and Stage for stars and notifiers (#2447)
* Use FeatureEntry and Stage for stars and notifiers

* Comments and handle special fields

* changes suggested by @jrobbins
2022-11-09 10:34:51 -08:00
Daniel Smith e2ce1d405e
Use FeatureEntry for most client-side use cases (#2433)
* Use FeatureEntry entity for most client-side uses

* leave notify and amendments to Feature for now

* handle redis keys
2022-11-06 12:57:40 -08:00
Jason Robbins 7069f4e4f9
Fix double-write for ready_for_trial_url. (#2427)
* Fix double-write for ready_for_trial.

* Store ready_for_trial in announcement_url

* Simplify double-write of dev trail announcement_url
2022-11-02 16:17:01 -07:00
Daniel Smith 87a7a23d1f
Move Feature methods to helper files (#2407)
* type hints

* Revert "type hints"

This reverts commit 9ffab5aabd.

* Move feature functions to separate helpers file

* remove import

* more import removal

* end of file newline

* mypy ignore ndb

* @jrobbins review changes

- Removed older standardization field logic
- Added TODO for migration script for values in migrate_views()
2022-10-27 10:17:54 -07:00
Jason Robbins 8586ace822
Implement simple full-text search using NDB (#2392)
* Progress

* Code complete

* Started writing tests

* local mypy

* Finished tests for now and fixed some defects
2022-10-26 12:09:01 -07:00
Jason Robbins c3ecc06b9d
Remove unused feature json version=1 (#2394)
* Phase out feature JSON version 1.

* Delete unused DictModel.format_for_template()
2022-10-25 16:16:54 -07:00
James C Scott III dad9bcceb6
Remove RSS functionality and dependencies (#2393)
Fixes #2366
2022-10-25 12:17:23 -04:00
Daniel Smith b833192a13
Write Stage, Gate, and Vote entities (#2330)
* Write Stage, Gate, and Vote entities

* More tests for Stage and Gate

* Remove old imports from review_models.py

* revert approval_def constants references

* remove unused imports

* revert cache prefix change

* remove whitespace at end of line

* mypy fix

* fix ndb import
2022-10-24 07:10:36 -07:00
Daniel Smith 49fb21595d
Run mypy in Github continuous integration checks (#2324)
* run mypy in CI

* more type hint fixing

* Update requirements.txt

* google.cloud import workaround

https://github.com/python/mypy/issues/10360

* Revert "google.cloud import workaround"

This reverts commit e03dbc7bbeb67acc81f57b9c5d905b9141952dbc.

* mypy google.cloud workaround

https://github.com/python/mypy/issues/12985

* fix regular tests

* remove --install-types flag

* last mypy fix

* type fixes for address_reasons

* move email lists creation

* update for newly merged changes

* Fix regular tests

* Changes suggested by @jrobbins

* Catch invalid requests

* small type hint

* Change methods to properly override

* revert to previous implementation

* revert test

* add back original validate request type method

* remove unused import and rearrange methods

* remove comment string casting; add test back

* add ndb ignore

* Update test_html_rendering.html

* mypy fix

* remove merge addition
2022-10-24 06:40:21 -07:00
Kyle Ju 582a594aa8
Use get_int_arg for integer arg parsing (#2359)
* Replace with get_int_arg usage

* Address comments

Co-authored-by: Kyle Ju <kyleju@chromium.org>
2022-10-19 14:08:42 -07:00
James C Scott III ad9ee9ae31
Remove all references to django (#2358)
* Remove all references to django

Replace any functionality with flask

* more cleanup

* fix template test after removing empty comment

* remove unused test_app
2022-10-19 13:51:39 -04:00
James C Scott III 385d62374b
Add assertions for the templates in #2355 (Part 2 of 2) (#2356)
* Add assertions for the templates in #2355

- Move the TESTDATA functionality to a testing_config to be a test helper.
In this new helper, users can still retreive from it like a dictionary.
In addition, there's a helper function to help make goldens that can be
used to regenerate the golden templates. Add commented out
code to use it.
- Add some clean ups to individual tests or test cases. This was needed
because some of the existing rendering tests would pull from the database.
But since they only asserted for the existence of some values, it did
not matter. In the future, we can add mocks for all of those.
  - These cleanups also help for more than the rendering tests. Before these fixes, there were ~15 non-rendering tests that would fail if a developer ran the full suite with a clean db, then re-ran a test indivdually without resetting the database. There are still 2 non-rendering tests that fail without clearing the database first. But this first iteartion got a lot of them.
- Add a missing test for the PrepublicationHandler to increase coverage

* address comments

* more cleanup
2022-10-19 10:14:52 -04:00
James C Scott III ea1e4a325d
Add templates for tests (#2355)
This is a split of #2323. In order to make that PR readable, I split that up.
This commit only contains the testdata.
2022-10-18 15:29:42 -04:00
Daniel Smith 9ed293d7a2
Change existing handler classes to properly override request methods (#2342)
* Change methods to properly override

* Update comments_api.py

* Update comments_api.py
2022-10-16 08:39:35 +02:00
Daniel Smith bccb415791
Remove ability to update feature_type field (#2320)
* remove ability to update feature type

* fix webtest

* show feature_type as disabled
2022-10-12 09:16:54 +02:00
Daniel Smith 3d511e4553
Some introductory type hinting and refactoring (#2319)
* some introductory type hinting and refactoring

* Update user_models.py
2022-10-12 09:16:36 +02:00
Daniel Smith b4fa4daf5a
Migrate and write additional fields for FeatureEntry and Stage (#2318)
* Handle final fields

Add `announcement_url` to the Stage kind, and populate entities in the migration using the `ready_for_trial_url` field. Additionally, migrate the `experiment_timeline` field for FeatureEntry.

* Update guide.py
2022-10-11 18:56:48 +02:00
Daniel Smith d8b9c00927
Write to Stages when editing a feature (#2311)
* write to stages upon editing

* docstring

* simplify test

* Update core_models.py
2022-10-11 08:58:06 +02:00
Jason Robbins 7f76c029f3
Remove unused references to opera milestones (#2314) 2022-10-10 13:41:14 -07:00
Daniel Smith 75b7c85953
default values for some required fields (#2310) 2022-10-10 19:43:40 +02:00
Daniel Smith e4dfbca7db
Rename FeatureEntry fields with clear email names (#2297)
* rename email fields

* renamed comment

* comment typo
2022-10-05 09:59:54 -07:00
Daniel Smith b7247f30d6
Fix FeatureEntry editing (#2288)
* Update guide.py

* Update guide.py
2022-10-03 14:05:46 -07:00
Daniel Smith 7b08f2a6b8
Write and edit FeatureEntry entities when creating Features (#2278)
* Double write Feature and FeatureEntity entries

* Update tests

* tuples as needed
2022-10-03 10:11:05 -07:00
James C Scott III 229cae9d31
Add cc field to features (#2252)
* 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
2022-09-21 13:15:22 -04:00
Kyle Ju fe65355d6a
Completely migrate feature-related cache off ramcache (#2234)
* Implement scan

* Migrate feature cache

* Address comments

* Fix

* Add cache_key argument

Co-authored-by: Kyle Ju <kyleju@chromium.org>
2022-09-14 10:07:32 -07:00
Jason Robbins 0fc62d05ff
Clarify where we load features directly from the DB, not cache. (#2239) 2022-09-13 16:30:34 -07:00
Kuan-Hsuan (Kevin) Shen 5b7a34c7b4
Remove unused html files and change app title dynamically (#2236)
* Remove unused html files and change app title dynamically

* Remove featuredetail.py and its test
2022-09-13 16:19:55 -04:00
Kuan-Hsuan (Kevin) Shen a9844400b1
Launch the SPA (#2224)
* Launch the SPA

* Remove unused imports

* Address comments

* Avoid pushState when url has already matched
2022-09-13 14:54:32 -04:00
Kyle Ju e5f9a7b642
Create Redis staging setup (#2211)
* Redis staging setup

* Add an if for staging

* Implement Redis caching APIs (#2212)

* Redis APIs

* Nit

* Partially migrate Ramcache usage to Redis (#2214)

* Migrate all fields except feature-related cache

* Fix

* Address comments

Co-authored-by: Kyle Ju <kyleju@chromium.org>

Co-authored-by: Kyle Ju <kyleju@chromium.org>

Co-authored-by: Kyle Ju <kyleju@chromium.org>
2022-09-12 13:56:50 -07:00
Kuan-Hsuan (Kevin) Shen 139689bc73
Farewell to `guideforms.py` and all the Django form widgets 🎉 (#2221)
* 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

* Farewell to `guideforms.py`

* Remove Django widgets
2022-09-08 20:45:57 -04:00
Kuan-Hsuan (Kevin) Shen 34f38346b2
Move display field defs to JS and remove fielddefs API (#2219)
* 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
2022-09-08 18:28:30 -04:00
Kuan-Hsuan (Kevin) Shen affbe1a641
Complete migration of forms to JS (#2218)
* Migrate guide/stage page forms to JS

* Complete migration of forms to JS
2022-09-08 16:17:02 -04:00
Kuan-Hsuan (Kevin) Shen 7cb18a54a3
Migrate guide/stage page forms to JS (#2217) 2022-09-08 16:02:04 -04:00
Kuan-Hsuan (Kevin) Shen 10f160dee7
Migrate flat forms to JS to render editall page form (#2210) 2022-09-07 12:45:56 -04:00
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
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 9970ec3d7a
Enable new permissions system (#2174)
* enable new permissions

* review changes
2022-08-26 15:30:55 -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
Jason Robbins 697cf9b38d
Refactor remaining models.py code into core_models.py (#2160)
* Refactor remaining models.py to core_models.py.

* Move tests to the right _test file.
2022-08-23 16:00:02 -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
Jason Robbins 86561da513
Replace RSS with notice that it is not offered. (#2151) 2022-08-22 10:34:33 -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 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
Jason Robbins 689483c0f3
Refactor user-related models into a separate file. (#2141) 2022-08-17 18:14:19 -07: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 03ed01a8f0
Replace more obsolete page handlers with ConstHandler. (#2114)
* Replace more obsolete page handlers with ConstHandler.

* Also replace the user settings page.
2022-08-14 08:05:17 -07:00
Jason Robbins 0972d89600
Refactor models.py enums into core_enums.py. (#2106) 2022-08-12 15:49:32 -07:00
Jason Robbins 1c729b2208
Replace metrics timeline handlers with ConstHandler. (#2108) 2022-08-12 15:21:36 -07:00
Jason Robbins b70990f104
Escape field values in HTML form generation. (#2110) 2022-08-12 10:44:15 -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 Smith 8625cf3c61
Send reminders to verify accuracy of data before important milestones (#2078)
* accuracy notifications cron job

* send emails in staging environment

* Update templates/accuracy_notice_email.html

Co-authored-by: Joe Medley <jmedley@google.com>

* changes suggested by @jrobbins

* remove unnecessary type conversion

* typo fix

Co-authored-by: Joe Medley <jmedley@google.com>
2022-08-08 11:33:18 -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
Daniel Smith 9c68386cb7
Temporary editing permissions (#2069)
* Update guide.py

* check if user is already an editor

* typo fix
2022-07-28 15:34:47 -05: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
Jason Robbins a9a12ec825
Clarify in the UI that samples can be "demos and samples". (#2057) 2022-07-22 08:29:13 -07:00
Daniel Smith 8ee81f5d82
Create new creator field for features (#2034)
* add creator field

* cron job to add creator field

* changes suggested by @jrobbins

* add logging
2022-07-20 09:43:19 -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
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
Daniel LaLiberte b4ad8c0b41
Migrate more help text (#2001) 2022-07-07 16:35:17 -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
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
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