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

264 Коммитов

Автор SHA1 Сообщение Дата
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
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
Jason Robbins 2f9274488d
Fix UI behavior afte saving user prefs. (#1961)
* Fix UI behavior afte saving user prefs.

* Update and simplify unit test.
2022-06-21 13:45:42 -07: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 a81d997261
Reduce maxlength to fit limitations of StringProperty fields. (#1942)
* Reduce maxlength to fit limitations of StringProperty fields.

* Round down because some characters count as two.
2022-06-15 17:47:41 -07:00
Jason Robbins 30f05019db
Cope with missing select values. (#1939) 2022-06-15 15:16:06 -07:00
Jason Robbins 682e52bdcd
Avoid type="email" for multi emails. (#1933)
* Avoid type="email" for multi emails.

* A smaller change for the same result
2022-06-13 19:28:57 -07:00
Jason Robbins d0f72920b0 Fix autocomplete unit test in a different way. 2022-06-13 23:14:51 +00: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
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
Joe Medley dcedb251b3
Update help text. (#1924)
* Improve the summary help text.

* Add missing quotation mark.

* Change wording slightly.

* Add space after comma.

Co-authored-by: Jason Robbins <jrobbins@gmail.com>
2022-06-08 13:33:02 -07:00
Daniel LaLiberte aa69b9cf87
Add URL validation pattern and MultiUrlField validator (#1901)
* Add single and multi URL form field validation

* Add MultiUrlField

* Add unit test of validate_url

* Add  comment about the url pattern.
2022-05-27 12:02:49 -04:00
Jason Robbins 917c24b74d
Include all_platforms in both i2e and i2s. (#1893) 2022-05-19 12:43:38 -07:00
Daniel LaLiberte e5f1b48d31
Add styling for invalid form field values (#1870)
* Add styling for invalid form field values

* Apply to all multiple email address fields. Use pattern attr to do better validation

* Simplify and correct the email address regex
2022-05-17 15:01:03 -04:00
Jason Robbins ef70a1ab9e
Validate link scheme. (#1873) 2022-05-06 16:56:42 -07:00
Joe Medley 69a106b707
Fix platform spellings. (#1839) 2022-04-17 10:37:48 -07:00
Jason Robbins 552310000c
Revise field help for antipated_spec_changes. (#1835) 2022-04-14 11:12:58 -07:00
Jason Robbins 1ce851fa34
Add field for anticipated spec changes before i2s. (#1832) 2022-04-12 16:53:22 -07:00
Jason Robbins 3710ae1efd
Add fields for WebView OT milestones. (#1830) 2022-04-12 08:42:48 -07:00
Jason Robbins 988c11948e
Set up the new feature list page initially as a feature table. (#1821) 2022-04-07 17:40:39 -07:00
Jason Robbins 0aa2b3cfc9
Relabel owners from "Contact emails" to "Feature owners" (#1783) 2022-03-14 16:44:19 -07:00
Jason Robbins c5b4f276df
Remove obsolete pages: /schedule and /samples. (#1787) 2022-03-14 16:13:01 -07:00
Jason Robbins 761be2732a
Add field for webview_risks. (#1782)
* Add field for webview_risks.

* Update pages/guideforms.py

Co-authored-by: Chris Harrelson <chrishtr@gmail.com>

* Update guideforms.py

Fixed an existing spelling error.

Co-authored-by: Chris Harrelson <chrishtr@gmail.com>
2022-03-09 13:37:07 -08:00
Joe Medley e8c78ee13a
Improve help text for the summary. (#1759) 2022-02-24 11:47:32 -08:00
Daniel LaLiberte a3a2299825
Dlaliberte/django html validation (#1747)
* Add html validation for edit.html. Fix 2 html bugs

* Add html validation for guide, intentpreview, and metrics

* Add test of FeaturePopularityHandler

* Add roadmap_test.py and test of RoadmapHandler

* Fix uses of TEMPLATE_PATH. Add blink_handler_test.

* Add template tests for users.html

* Fix some more test class names.

* One more class name fix.

* Easy fixes.
2022-02-23 21:00:38 -05:00
Daniel LaLiberte 45f904e604
Add html validation for edit.html. Fix 2 html bugs (#1746) 2022-02-16 18:18:14 -05:00
Joseph Medley d682725522 Add clarifying instructions to help text. 2022-02-15 09:51:15 -08:00
Daniel LaLiberte 331f92f3d6 A couple more tests, and one html fix. 2022-02-10 23:09:03 +00:00
Daniel LaLiberte 32cff34cb9 Add html validation to more tests 2022-02-10 19:07:45 +00:00
Daniel LaLiberte bf5b352680 Add test that template renders valid html. 2022-02-05 01:35:03 +00:00
Jason Robbins f0a8733509
Redirect to feature detail page when feature ID is in URL. (#1713)
* Redirect to feature detail page when feature ID is in URL.

* Fix the arrow navigation from the feature detail page to the list.

* Updated unit test
2022-02-02 10:54:43 -08:00
Jason Robbins 317b98fced
Add motivation to the implementation stage for dev-facing changes. (#1703) 2022-01-26 17:14:28 -08:00
Jason Robbins 6aecdb1420
Resolve some more code scanning issues. (#1700)
* Resolve some more code scanning issues.

* Dont log secret prefix.

* Try to outsmart scanner
2022-01-25 16:40:00 -08:00
Johnny Stenback 8fad20e805
Fix DevTrial typo (#1688) 2022-01-19 09:47:06 -08:00
Jason Robbins 7ef9184080
Add non_oss_deps field to guide and intent email template. (#1679) 2022-01-14 14:12:34 -08:00
Jason Robbins fe3f910336
In py3 code, replace the separate mock lib with unittest.mock. (#1665) 2022-01-11 08:20:40 -08:00
Jason Robbins 9a20012660
Add navigational context for feature detail page back arrow. (#1640) 2021-12-08 07:57:37 -08:00
Jason Robbins a6704e72d7
Revert "Add a field for next_review_date. (#1617)" (#1621)
This reverts commit 946ecfbb2f.
2021-11-29 12:32:33 -08:00
Jason Robbins 946ecfbb2f
Add a field for next_review_date. (#1617)
* Add a field for next_review_date.

* Add check for next_review_date to unit test
2021-11-24 12:49:28 -08:00
Jason Robbins 16792ca436
Better intent parsing and add extend experiment link. (#1586)
* Better intent parsing and add extend experiment link.

* Update templates/blink/intent_to_implement.html

Co-authored-by: Kyle Ju <kyleju@google.com>

Co-authored-by: Kyle Ju <kyleju@google.com>
2021-10-19 16:02:46 -07:00
Jason Robbins c57f61680e
Remove Webview DT from the UI. (#1583) 2021-10-13 18:28:22 -07:00
Jason Robbins e9ae478b7d
Remove edge signals and add other signals. (#1581)
* Remove edge signals and add other signals.

* Revert unintented file change
2021-10-13 18:28:03 -07:00
Jason Robbins e77396a8cc
Make app deployable with py3. (#1559)
* Make app deployable with py3.

* Handle empty API posts
2021-09-24 15:19:17 -07:00
Jason Robbins 527c49abed
Move routing configuration to main.py. (#1552)
* Move routing configuration to main.py.

* inline_file works so we dont need this directive

* rebased

* Removed __future__s
2021-09-23 13:01:43 -07:00
Jason Robbins 548828aaa0
Some easy pylint fixes. (#1557) 2021-09-23 12:04:33 -07:00
Kyle Ju b6bb10195a
Run 2to3 to detect py2 to py3 changes (#1551)
* Run 2to3 -w -n .

* Update internals/fetchmetrics.py

* Update internals/models.py

* Update internals/notifier.py

* Update pages/blink_handler.py

* Update internals/fetchmetrics.py
2021-09-22 18:23:14 -07:00
Jason Robbins 940fa4440c
Fix tests in pages/ and internals/. (#1550) 2021-09-22 10:59:55 -07:00
Kyle Ju 06ce5bc8db
Run tests on py3 (#1534)
* 8 exceptions and 3 test failures
2021-09-21 15:49:40 -07:00
Jason Robbins 1981777c20
Implement myfeatures page boxes for starred-by:me and owner:me (#1533)
* wrote code

* Added unit tests and removed unwanted CSS.

* Use warning() because warn() is deprecated.

* Update internals/models.py

Co-authored-by: Kyle Ju <kyleju@google.com>

* Incorporated review comments.

Co-authored-by: Kyle Ju <kyleju@google.com>
2021-09-17 17:20:25 -07:00
Jason Robbins 74232d20d6
Rename "Upcoming" page to "Roadmap". (#1540) 2021-09-17 10:55:56 -07:00
Jason Robbins caaa660c4b
Eliminated references to GAE users. (#1532) 2021-09-14 17:24:55 -07:00
kyleju e47788f85b Add sign_in 2021-09-14 20:23:16 +00:00
Jason Robbins c42529a172
First attemp at a unit test for templates. (#1519) 2021-09-09 07:17:39 -07:00
Tsuyoshi Horo 1cef7966bf
Fix dt_milestone_android_start (#1520)
Currently "DevTrial on android" is not printedd in "Ready for Trial"
mail becaus of the typo in estimated-milestones-table.html.
And the help_text is guideforms.py is not correct.

This PR fixes them.
2021-09-08 08:01:04 -07:00
Joseph Medley 9459686171 Upate help text for current page structure. 2021-09-01 12:51:04 -07:00
Jason Robbins 180b65d66f
Outline code for /myfeatures page. (#1481)
* Outline code for /myfeatures page.

* Update templates/myfeatures.html

Co-authored-by: Kyle Ju <kyleju@google.com>

Co-authored-by: Kyle Ju <kyleju@google.com>
2021-08-27 18:19:00 -07:00
Jason Robbins 698052a3c7
Clarified field doc for requires_embedder_support (#1440) 2021-08-02 15:33:18 -07:00
Jason Robbins 737cf34ddd
Fix another XML feed defect and add tests. (#1439) 2021-07-28 13:42:18 -07:00
Jason Robbins ab8b2c1421
Add fields for DevTrial milestones. (#1425)
* Add fields for DevTrial milestones.

* Changed wording and added android OT milestones

* Added JS to copy desktop milestones to other platforms.
2021-07-26 12:17:00 -07:00
Jason Robbins 777e7c7d5d
Use version=1 for /features.xml. (#1429) 2021-07-22 12:47:33 -07:00
Jason Robbins 450c997d69
Add standard_maturity field. (#1428) 2021-07-21 15:37:45 -07:00
Shivam Agarwal 849a8536fa
New upcoming page (#1426)
* Created Upcoming page by duplicating code from schedule page

* The new upcoming page now uses Features and Channels API to fetch data

* Fetching features of each milestone separately

* Using csClient for fetching information

* Removed unreferenced variable set from upcoming-page.js
2021-07-20 13:59:55 -07:00
Mathias Bynens 0f342016e2
Make “debuggability” field required (#1408)
Issue: #1372
2021-07-14 10:15:30 -07:00
Jason Robbins 78ce7f7123
Add target to an outbound link. (#1407) 2021-07-13 18:30:16 -07:00
Mathias Bynens 5b1ffedf4a
Update debuggability field description (#1375) 2021-07-13 13:10:23 -07:00
Shivam Agarwal d1925b675e
Channels API (#1400)
* Channels API

* Added TODOs

* Using different namespace for mocking get_omaha_data
2021-07-07 11:50:13 -07:00
Shivam Agarwal 37db1a335d
20210702 new features api (#1399)
* Added new API for all features

* Added Test for Feature API

* Added more tests
2021-07-06 19:01:43 -07:00
Mathias Bynens 783dd200d1
Fix indentify → identify typo (#1398) 2021-07-06 10:33:46 -07:00
Jason Robbins 21188cbb47
Fix FeatureOwner order() property and improve performance of /admin/blink. (#1382) 2021-07-01 13:14:25 -07:00
Jason Robbins 7c28b6f952
Add field requires_embedder_support. (#1373) 2021-06-29 15:28:44 -07:00
Shivam Agarwal fd6018bd3d
20210618 gae ndb to cloud ndb (#1365)
* Added Cloud NDB to requirements

* google-cloud-core 1.7.0 requires google-auth<2.0dev,>=1.24.0, but you'll have google-auth 1.20.1 which is incompatible.

* Running DataStore Emulator on port 15606 and setting environment variable for the same

* Replaced GAE NDB imports with Cloud NDB imports

* Solved Error: No Context for Ramcache

* Solved No NDB Context Error for Cloud NDB

* Fixed Error No object QueryOptions

* Removed clear_datstore flag

* Fixed to_dict() method

* Added explicit call to method for stashing values while editing a feature

* Using Cloud NDB in testbed

* Updated README with JRE instructions and setting the DJANGO_SETTTINGS_MODULE environment variable for django.setup

* Added Env Variable for datastore emulator

* Migrated accounts_api_test.py

* Migrated approvals_api_test.py

* Migrated Comments.py and Cues_api_test.py

* Migrated Features.py

* Migrated metricsdata_test.py

* Migrated stars_api_test.py

* Fixed Deprecation warning for query options

* Migrated token_refresh_api_test.py

* Migrated basehandlers_test.py

* Migrated permissions_test.py

* Migrated ramcache_test.py

* Migrated secrets_test.py

* Migrated xsrf_test.py

* Migrated fetchmetrics_test.py

* Migrated models_test.py

* Migrated notifier_test.py

* Migrated processes_test.py

* Migrated featuredetail_test.py

* Migrated featurelist_test.py

* Migrated guide_test.py

* Migrated intentpreview_test.py

* Migrated samples_test.py

* Removed some unused stubs

* Set the consistency of datastore emulator to be 1

* Resetting the database emulator before running the tests

* Added npm targets for starting and stopping emulator

* Updated README and Developer Docs

* Removed unused imports

* Made NDB calls DRY
2021-06-28 19:05:04 -07:00
Jason Robbins 5c3ca11a72
Update loading primary_blink_components to NDB. (#1369) 2021-06-23 09:47:07 -07:00
Jason Robbins 98a0d63084
Delete unused imports and commented-out code. (#1362) 2021-06-18 08:48:04 -07:00
Jason Robbins ba4cabcfc6
Remove a reference to GAE users. (#1363) 2021-06-18 08:43:12 -07:00
Shivam Agarwal 299516574f
GAE DB Client to GAE NDB (#1352)
* Migrated models.py

* Migrated bulkloader_helpers.py

* Migrated accounts_api.py

* Migrated models.py

* Migrated ramcache.py

* Migrated secrets.py

* Migrated basehandlers.py

* Migrated metricsdata.py

* Migrated fetchmetrics.py

* Migrated notifiers

* blink_handler

* guide.py

* users.py

* fix_data.py

* appengine.py

* Migrated all order() function calls

* Fixed filterby[]

* Migrated all filter() queries

* Migrated some left out lines

* Fixed Bug: json_dump would result in TypeError

* Fixed bug - key() is not callable

* Bug Fix: Query Filters were not working

* Fixed Bug: JSON output of feature list would not contain feature id

* Removed unused ndb import

* Fixed Bug: old_val would have properties wrappped in _BaseValue

* Migrated Tests

* Fixed Test: capstone has no attribute delete()

* Fixed Bug: A filter won't work

* Fixed Bug: Index out of range if self.Blink_components length is 0

* Fixed Bug: Some order statements won't work

* Assigning default value to Feature_blink_components

* Fixed Bug: A filter won't work

* Fetching singleton using ancestor for strong consistency

* Moved the ancestor query for strong consistency to replace the correct original query

* Replaced _pre_put_hook with _from_pb

* Fix: NDB picked up old properties while looping over self.properties

* Fix: NDB would generate diffs if None is compared with empty strings
2021-06-17 13:47:02 -07:00
Jason Robbins a79b26f595
Convert old UI-style user admin requests to JSON API. (#1326) 2021-05-19 15:21:18 -07:00
Jason Robbins d92661ffa2
Make auto-user fields non-auto. (#1310) 2021-05-06 18:12:39 -07:00
Shivam Agarwal 8fbebb7989
20210418 google sign in (#1275)
* Added Google Platform Library

* Added Meta Element for Client ID

* Added Google Sign-In Button

* Authenticating the id_token on our backend

* Saving id_token in flask session, using the id_token to fetch the current user and replaced the usages of AppEngine Users API (not from *_tests.py)

* Correct the flow on pressing SignIn and SignOut

* Code refactor

* Added Comment for is_current_user_admin

* Supporting GAE Users library for post request

* Made some fixes

* Changed Admin User condition

* Reloading only on 200 response code

* Do not require sign in and xsrf token while sending post request for login

* Sign Out using Google Sign In if cookie is not set after login

* Clearing the session if the id_token stored in the session variable becomes invalid or expires

* Replaced GAE Users from tests

* Replaced GAE users with framework users in tests.py
2021-05-06 16:37:30 -07:00
Jason Robbins f4726b7455
Allow site admins to be specified via AppUser entities. (#1288) 2021-04-27 18:56:37 -07:00
Jason Robbins d7e3213297
Remove unused field intent_template_use_count. (#1283) 2021-04-27 15:02:10 -07:00
Jason Robbins af7b485d17 Fix permission checking for unlisted features. 2021-04-23 17:12:07 -04:00
Jason Robbins a761f6ad16
Further align ChromeStatus with the launching-features doc. (#1269) 2021-04-19 11:24:57 -07:00