Fix the star column not updating from mobile mode
Review Request #8155 — Created May 11, 2016 and submitted
Previously, when a datagrids switched from mobile mode to desktop mode,
all state (such as whether a review request or group was starred) that
changed in mobile mode would be lost. Now, we keep track of these
changes with theRB.StarManagerView
, which will update the affected
rows in the datagrid when transitioning to desktop mode.
Manually tested the following star icons:
- Review request datagrid
- Group datagrid
- Individual review request pages
Ran JS tests.
Description | From | Last Updated |
---|---|---|
Trailing ws. |
david | |
Trailing ws. |
david | |
Semicolon. |
david | |
You never use this inside this function, so there's no reason to bind. |
david | |
Should we have an else clause that asserts? |
david | |
Since you only test whether this is falsy, you don't need the || false part. |
david | |
Still repeating this twice. |
david | |
Still repeating this twice. |
david |
- Change Summary:
-
Addressed David's issues.
- Diff:
-
Revision 2 (+193 -67)
-
Tool: Pyflakes Processed Files: reviewboard/staticbundles.py Ignored Files: reviewboard/scmtools/testdata/hg_repo/.hg/cache/rbc-revs-v1 reviewboard/static/rb/js/views/starManagerView.js reviewboard/scmtools/testdata/hg_repo/.hg/cache/rbc-names-v1 reviewboard/static/rb/js/models/starManagerModel.js reviewboard/static/rb/js/common.js reviewboard/static/rb/js/pages/views/datagridPageView.js reviewboard/static/rb/js/pages/views/reviewablePageView.js Tool: PEP8 Style Checker Processed Files: reviewboard/staticbundles.py Ignored Files: reviewboard/scmtools/testdata/hg_repo/.hg/cache/rbc-revs-v1 reviewboard/static/rb/js/views/starManagerView.js reviewboard/scmtools/testdata/hg_repo/.hg/cache/rbc-names-v1 reviewboard/static/rb/js/models/starManagerModel.js reviewboard/static/rb/js/common.js reviewboard/static/rb/js/pages/views/datagridPageView.js reviewboard/static/rb/js/pages/views/reviewablePageView.js
-
It looks like this breaks starring for review requests? Or have those moved beyond using the code in
common.js
? If this is truly specific to datagrids now, I feel like the naming needs to be more specific, as it sounds generic (StarManager) and yet is only in the datagrid bundle.
-
Tool: PEP8 Style Checker Processed Files: reviewboard/staticbundles.py Ignored Files: reviewboard/static/rb/js/views/starManagerView.js reviewboard/static/rb/js/common.js reviewboard/static/rb/js/pages/views/datagridPageView.js reviewboard/static/rb/js/pages/views/reviewablePageView.js reviewboard/static/rb/js/models/starManagerModel.js Tool: Pyflakes Processed Files: reviewboard/staticbundles.py Ignored Files: reviewboard/static/rb/js/views/starManagerView.js reviewboard/static/rb/js/common.js reviewboard/static/rb/js/pages/views/datagridPageView.js reviewboard/static/rb/js/pages/views/reviewablePageView.js reviewboard/static/rb/js/models/starManagerModel.js
-
Tool: Pyflakes Processed Files: reviewboard/staticbundles.py Ignored Files: reviewboard/static/rb/js/views/starManagerView.js reviewboard/static/rb/js/common.js reviewboard/static/rb/js/pages/views/datagridPageView.js reviewboard/static/rb/js/pages/views/reviewablePageView.js reviewboard/static/rb/js/models/starManagerModel.js Tool: PEP8 Style Checker Processed Files: reviewboard/staticbundles.py Ignored Files: reviewboard/static/rb/js/views/starManagerView.js reviewboard/static/rb/js/common.js reviewboard/static/rb/js/pages/views/datagridPageView.js reviewboard/static/rb/js/pages/views/reviewablePageView.js reviewboard/static/rb/js/models/starManagerModel.js
-
Tool: Pyflakes Processed Files: reviewboard/staticbundles.py Ignored Files: reviewboard/static/rb/js/views/starManagerView.js reviewboard/static/rb/js/common.js reviewboard/static/rb/js/pages/views/datagridPageView.js reviewboard/static/rb/js/pages/views/reviewablePageView.js reviewboard/static/rb/js/models/starManagerModel.js Tool: PEP8 Style Checker Processed Files: reviewboard/staticbundles.py Ignored Files: reviewboard/static/rb/js/views/starManagerView.js reviewboard/static/rb/js/common.js reviewboard/static/rb/js/pages/views/datagridPageView.js reviewboard/static/rb/js/pages/views/reviewablePageView.js reviewboard/static/rb/js/models/starManagerModel.js
-
Tool: Pyflakes Processed Files: reviewboard/staticbundles.py Ignored Files: reviewboard/static/rb/js/views/starManagerView.js reviewboard/static/rb/js/common.js reviewboard/static/rb/js/pages/views/datagridPageView.js reviewboard/static/rb/js/pages/views/reviewablePageView.js reviewboard/static/rb/js/models/starManagerModel.js Tool: PEP8 Style Checker Processed Files: reviewboard/staticbundles.py Ignored Files: reviewboard/static/rb/js/views/starManagerView.js reviewboard/static/rb/js/common.js reviewboard/static/rb/js/pages/views/datagridPageView.js reviewboard/static/rb/js/pages/views/reviewablePageView.js reviewboard/static/rb/js/models/starManagerModel.js