-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #1861 - Triage Dashboard Design #1935
Conversation
- Added CSS for improving design - Organize folders and submodules
this https://github.com/webcompat/webcompat.com/pull/1935/files#diff-23e0a36bbee957147173901eb77913cbR510 (see #1861 (comment)) is temporary I guess? Seems not safe .. |
webcompat/helpers.py
Outdated
@@ -507,7 +507,7 @@ def add_csp(response): | |||
"font-src 'self'; " + | |||
"img-src 'self' https://www.google-analytics.com https://*.githubusercontent.com data:; " + # nopep8 | |||
"manifest-src 'self'; " + | |||
"script-src 'self' https://www.google-analytics.com https://api.github.com; " + # nopep8 | |||
"script-src 'self' 'unsafe-inline' https://www.google-analytics.com https://api.github.com; " + # nopep8 @todo removed unsafe-inline |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot @magsout.
Some comments and requests for change.
Also the footer might need a bit of text :)
> | ||
<option value="">All browsers</option> | ||
<option value="firefox">Firefox</option> | ||
<option value="chrome">Chrome</option> |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
shouldRenderNeedsTriageList() | ||
} | ||
|
||
/* readable date*/ |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
} | ||
} | ||
|
||
/* handle render or not render NeedsTriageList*/ |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
Triages.classList.add("is-oldest") | ||
break; | ||
default: | ||
alert("tri non supporté") |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
method="get" | ||
action="" | ||
role="form" | ||
> |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
</style> | ||
|
||
<header class="wc-TopBar" role="banner"> | ||
<h1 style="margin: 0; font-size: 1.3em">Triage Dashboard</h1> |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
if(renderActivityIndicator) { | ||
shouldRenderActivityIndicator() | ||
} | ||
/* liste triage */ |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
} | ||
} | ||
|
||
const filteringSort = () => { |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
Tests and typos are fixed. Just need to figure out how to fix the behaviour of the Sort Filter |
@karlcow
edit: Finally, I decided to use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok everything looks good apart of the unsafe script.
Let's see what @miketaylr as he has been the one handling most of the CSP.
webcompat/helpers.py
Outdated
@@ -507,7 +507,7 @@ def add_csp(response): | |||
"font-src 'self'; " + | |||
"img-src 'self' https://www.google-analytics.com https://*.githubusercontent.com data:; " + # nopep8 | |||
"manifest-src 'self'; " + | |||
"script-src 'self' https://www.google-analytics.com https://api.github.com; " + # nopep8 | |||
"script-src 'self' 'unsafe-inline' https://www.google-analytics.com https://api.github.com; " + # nopep8 @todo removed unsafe-inline |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
</main> | ||
<script type="text/javascript"> | ||
/* Added an event onSubmit form */ | ||
document.getElementById("js-Filters").addEventListener("submit", (e) => { |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
webcompat/helpers.py
Outdated
@@ -507,7 +507,7 @@ def add_csp(response): | |||
"font-src 'self'; " + | |||
"img-src 'self' https://www.google-analytics.com https://*.githubusercontent.com data:; " + # nopep8 | |||
"manifest-src 'self'; " + | |||
"script-src 'self' https://www.google-analytics.com https://api.github.com; " + # nopep8 | |||
"script-src 'self' 'unsafe-inline' https://www.google-analytics.com https://api.github.com; " + # nopep8 @todo removed unsafe-inline |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
JS looks fine, just have the question why we can't stick it in an external file, rather than special case the CSP policy. |
@miketaylr thanks for the review, I will stick all the js in an external file. For fat arrow, the compatilibity seems ok right now, https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions#Browser_compatibility but if you want I can replace by simple functions |
- prettify file - remove unsafe-inline scrip src in csp policy
@karlcow @miketaylr done |
@karlcow @miketaylr I guess I let css in html files to avoid conflict with the refactor, what do you think ? |
Awesome -- thanks! Yeah, CSS should be fine. r+ from me. I'll let @karlcow merge in case he has any final thoughts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@magsout A little English grammar mistake.
and maybe slightly rebasing the commits into something cleaner.
And then we will merge.
Thanks a lot.
href="/issues/{{ issue['number'] }}" | ||
title="{{ issue['title'] }}" | ||
> | ||
More informations |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
I might take over the history and tweak for @magsout -- I know he's taking care of sick family right now. And I'd like to deploy this today/tomorrow. Thanks! |
I'm just gonna squash it all, the commits touch quite a bit of unrelated things. |
@karlcow
Let's try with this PR ;)
and maybe @miketaylr for the small JS part?