This repository has been archived by the owner on Feb 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 63
Create the Content Report flow #720
Merged
Merged
Changes from 9 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
6f57913
Move `VCheckbox` into its own directory
dhruvkb ff94866
Define `VRadio` as a companion to `VCheckbox`
dhruvkb 2d9c4ff
Add i18n for content reports
dhruvkb 8438bd2
Allow whitespace in popover to wrap as needed
dhruvkb 3300e76
Create the content report flow components
dhruvkb b3b0a36
Replace the dummy text with a working report feature
dhruvkb cb7a19d
Register `VRadio` component
dhruvkb 07a86d8
Separate strings for button text
dhruvkb def0345
Update specs to match the new flow
dhruvkb 6064bf5
Consistently use `~` for referring to the `src/` dir
dhruvkb aac9015
Make the popover render above everything else
dhruvkb 40fbc48
Remove the character counter
dhruvkb 551c696
Do away with the popover closing hack
dhruvkb 05c1593
Close popup when the 'Cancel' option is clicked
dhruvkb 6e11775
Add 'noreferrer' to the `rel` attr
dhruvkb d6be492
Use a clearer prop name for the foreign landing URL
dhruvkb 7934d4b
Implement updated flow for fixed height
dhruvkb 0e521a4
Make the submit button focusable when disabled
dhruvkb 2087696
Fix the issue with double scrollbars
dhruvkb 0c7f2ce
Move the close button above the form in terms of the DOM order
dhruvkb 4d8bd5e
Add min and max length to the form
dhruvkb ccc0a63
Merge branch 'main' into report_flow
dhruvkb db88298
Change import paths from '@' to '~'
dhruvkb 51ca14f
Make the checkbox and radio SVGs ARIA-hidden
dhruvkb 7fff77b
Update description field as per selected reason
dhruvkb 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
src/components/meta/VCheckbox.stories.js → ...nents/VCheckbox/meta/VCheckbox.stories.js
This file contains 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
This file contains 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,40 @@ | ||
<template> | ||
<VButton | ||
variant="plain" | ||
class="report-button font-semibold text-dark-charcoal" | ||
> | ||
<span class="md:hidden">{{ | ||
$t('media-details.content-report.short') | ||
}}</span> | ||
<span class="hidden md:inline">{{ | ||
$t('media-details.content-report.long') | ||
}}</span> | ||
<VIcon :icon-path="icons.flag" class="ms-2" /> | ||
</VButton> | ||
</template> | ||
|
||
<script> | ||
import { defineComponent } from '@nuxtjs/composition-api' | ||
|
||
import VIcon from '~/components/VIcon/VIcon.vue' | ||
|
||
import flagIcon from '~/assets/icons/flag.svg' | ||
|
||
export default defineComponent({ | ||
name: 'VContentReportButton', | ||
components: { VIcon }, | ||
setup() { | ||
return { | ||
icons: { | ||
flag: flagIcon, | ||
}, | ||
} | ||
}, | ||
}) | ||
</script> | ||
|
||
<style scoped> | ||
.report-button { | ||
@apply px-0; | ||
} | ||
</style> |
This file contains 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
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.
What is the goal for removing this? It makes the focus ring really "tight" around the text and the icon 🙁
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.
With the horizontal padding the report button appears noticeably out-of-alignment with the right side of the page.
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.
I see.
@panchovm how would you like these cases handled? Perhaps we shouldn't use a focus outline in these cases? We could translate the button horizontally to align it with the end rule of the page but that could cause unwanted horizontal scrolling in narrower screens if we're not careful.
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.
I would follow the Gutenberg approach, prioritizing the visual alignment for elements having no border like the
Edit
action in the gif below.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.
That's how it currently is. The focus outline appears a little closer to the text, but brings the button closer to the right edge.
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.
Okay, if it's fine for the focus-outline to hug the text like that then disregard this comment 🙂