-
Notifications
You must be signed in to change notification settings - Fork 5
Add triage statuses #188
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
Merged
Merged
Add triage statuses #188
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
3b1d484
Add triage statuses
ksy36 8109cad
E2E tests
ksy36 79d7c66
Change triaged_at for existing reports
ksy36 21273b1
Fix e2e test in Firefox
ksy36 8338f3e
Fixture updates
ksy36 e703754
Update triage status in the ui without page reloading
ksy36 b55c688
Fix flaky test showing NS_BINDING_ABORTED in Firefox
ksy36 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,3 +31,6 @@ dist/ | |
| # NPM | ||
| server/frontend/node_modules | ||
| server/frontend/dist | ||
|
|
||
| # Git worktrees | ||
| .worktrees/ | ||
This file was deleted.
Oops, something went wrong.
60 changes: 0 additions & 60 deletions
60
server/frontend/src/components/Buckets/HideBucketBtnForm.vue
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
214 changes: 214 additions & 0 deletions
214
server/frontend/src/components/Buckets/TriageBucketDropdown.vue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,214 @@ | ||
| <template> | ||
| <div class="triage-bucket-dropdown"> | ||
| <a class="btn btn-default" data-testid="triage-trigger" @click="showPanel"> | ||
| {{ currentStatus ? "Change triage status" : "Mark triaged" }} | ||
| </a> | ||
|
|
||
| <div v-if="isPanelVisible" class="triage-panel" data-testid="triage-panel"> | ||
| <div class="panel-header">Select status</div> | ||
| <div class="panel-options"> | ||
| <a | ||
| v-for="choice in choices" | ||
| :key="choice.value" | ||
| class="panel-option" | ||
| :class="{ 'panel-option--selected': choice.value === currentStatus }" | ||
| :data-testid="`triage-option-${choice.value}`" | ||
| @click="choice.value !== currentStatus && selectStatus(choice.value)" | ||
| > | ||
| <span class="option-rail"></span> | ||
| <span class="option-label">{{ choice.label }}</span> | ||
| <span v-if="choice.value === currentStatus" class="option-check" | ||
| >✓</span | ||
| > | ||
| </a> | ||
| </div> | ||
| <div v-if="currentStatus" class="panel-danger-zone"> | ||
| <a | ||
| class="panel-option panel-option--unmark" | ||
| data-testid="triage-unmark" | ||
| @click="selectStatus(null)" | ||
| > | ||
| <span class="option-rail"></span> | ||
| <span class="option-label">Unmark triaged</span> | ||
| </a> | ||
| </div> | ||
| <div class="panel-footer"> | ||
| <a class="panel-cancel" @click="hidePanel">Cancel</a> | ||
| </div> | ||
| </div> | ||
|
|
||
| <div v-if="isPanelVisible" class="panel-backdrop" @click="hidePanel"></div> | ||
| </div> | ||
| </template> | ||
|
|
||
| <script> | ||
| export default { | ||
| name: "TriageBucketDropdown", | ||
| props: { | ||
| bucketId: { | ||
| type: Number, | ||
| required: true, | ||
| }, | ||
| currentStatus: { | ||
| type: String, | ||
| default: null, | ||
| }, | ||
| choices: { | ||
| type: Array, | ||
| default: () => [], | ||
| }, | ||
| }, | ||
| emits: ["update"], | ||
| data() { | ||
| return { | ||
| isPanelVisible: false, | ||
| }; | ||
| }, | ||
| methods: { | ||
| showPanel() { | ||
| this.isPanelVisible = true; | ||
| }, | ||
| hidePanel() { | ||
| this.isPanelVisible = false; | ||
| }, | ||
| selectStatus(status) { | ||
| this.isPanelVisible = false; | ||
| this.$emit("update", status); | ||
| }, | ||
| }, | ||
| }; | ||
| </script> | ||
|
|
||
| <style scoped> | ||
| .triage-bucket-dropdown { | ||
| display: inline-block; | ||
| position: relative; | ||
| } | ||
|
|
||
| .triage-panel { | ||
| position: absolute; | ||
| top: calc(100% + 5px); | ||
| left: 0; | ||
| background: #fff; | ||
| border: 1px solid #ccc; | ||
| border-radius: 5px; | ||
| z-index: 1000; | ||
| min-width: 210px; | ||
| overflow: hidden; | ||
| } | ||
|
|
||
| .panel-header { | ||
| background: #fafafa; | ||
| padding: 9px 14px 8px; | ||
| border-bottom: 1px solid #eee; | ||
| font-weight: bold; | ||
| } | ||
|
|
||
| .panel-options { | ||
| padding: 4px 0; | ||
| } | ||
|
|
||
| .panel-option { | ||
| display: flex; | ||
| align-items: center; | ||
| padding: 0; | ||
| cursor: pointer; | ||
| color: #333; | ||
| text-decoration: none; | ||
| } | ||
|
|
||
| .panel-option:hover { | ||
| background-color: #f7f7f7; | ||
| text-decoration: none; | ||
| color: #333; | ||
| } | ||
|
|
||
| .option-rail { | ||
| display: block; | ||
| width: 3px; | ||
| align-self: stretch; | ||
| background-color: transparent; | ||
| flex-shrink: 0; | ||
| border-radius: 0 2px 2px 0; | ||
| } | ||
|
|
||
| .panel-option:hover .option-rail { | ||
| background-color: #ccc; | ||
| } | ||
|
|
||
| .panel-option--selected .option-rail { | ||
| background-color: #0066cc; | ||
| } | ||
|
|
||
| .option-label { | ||
| flex: 1; | ||
| padding: 8px 12px 8px 10px; | ||
| font-size: 13px; | ||
| line-height: 1.3; | ||
| } | ||
|
|
||
| .option-check { | ||
| padding-right: 12px; | ||
| font-size: 11px; | ||
| color: #0066cc; | ||
| font-weight: 700; | ||
| } | ||
|
|
||
| .panel-option--selected { | ||
| background-color: #f0f6ff; | ||
| cursor: default; | ||
| pointer-events: none; | ||
| } | ||
|
|
||
| .panel-option--selected .option-label { | ||
| color: #0055aa; | ||
| font-weight: 600; | ||
| } | ||
|
|
||
| .panel-danger-zone { | ||
| border-top: 1px solid #eee; | ||
| } | ||
|
|
||
| .panel-option--unmark .option-label { | ||
| color: #c0392b; | ||
| } | ||
|
|
||
| .panel-option--unmark:hover { | ||
| background-color: #fdf4f3; | ||
| } | ||
|
|
||
| .panel-option--unmark:hover .option-rail { | ||
| background-color: #c0392b; | ||
| } | ||
|
|
||
| .panel-option--unmark:hover .option-label { | ||
| color: #a93226; | ||
| } | ||
|
|
||
| .panel-footer { | ||
| padding: 7px 14px; | ||
| border-top: 1px solid #eee; | ||
| text-align: right; | ||
| background: #fafafa; | ||
| } | ||
|
|
||
| .panel-cancel { | ||
| color: #999; | ||
| cursor: pointer; | ||
| text-decoration: none; | ||
| } | ||
|
|
||
| .panel-cancel:hover { | ||
| color: #555; | ||
| text-decoration: none; | ||
| } | ||
|
|
||
| .panel-backdrop { | ||
| position: fixed; | ||
| top: 0; | ||
| left: 0; | ||
| right: 0; | ||
| bottom: 0; | ||
| z-index: 999; | ||
| } | ||
| </style> | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Not a blocker for this PR, but I'm not a massive fan of us having all this CSS specific to one dropdown. As we accumulate more components we're just adding lots of CSS for each one and it might be better to try to refactor a bit.
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.
True, I can probably just use bootstrap's dropdown since we're already including it:) I'll change it in a separate PR