-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A11y/fix your profile layout (#1684)
* feat(profile-item): add `profile-item` component to display user profile information * feat(user-profile): update view to use new component * feat(profile-item): add new css class and use it; regen index.css * fix(profile-item): remove unused class * fix(user-profile): update test following new markup * chore: formatting * a11y(profile-item): fix issue where `div`s were being created inside of `span`s * fix(cypress): skip video recording and screenshots for now since they go nowhere anyway * style(profile-item): align change bottom bottom right; make change font size text-small * style(profile-item): update styles to match designs * fix(test): update dom selector
- Loading branch information
1 parent
b34134c
commit 6eed766
Showing
7 changed files
with
38 additions
and
6 deletions.
There are no files selected for viewing
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
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -357,4 +357,7 @@ label { | |
} | ||
} | ||
|
||
.overflow-anywhere { | ||
overflow-wrap: anywhere; | ||
} | ||
/*! purgecss end ignore */ |
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,15 @@ | ||
{% from "components/table.html" import edit_field, text_field %} | ||
|
||
{% macro profile_item(label, value, action=None) %} | ||
<div class="flex flex-wrap md:flex-no-wrap items-end border-b-1 border-gray-400 py-5"> | ||
<div class="w-full sm:w-3/4" tabindex="0"> | ||
<div class="text-gray-600">{{ text_field(label) }}</div> | ||
<div class="font-bold inline-block mt-2 break-words mr-5 overflow-anywhere">{{ value }}</div> | ||
</div> | ||
<div class="w-full sm:w-1/4 sm:text-right"> | ||
{% if action %} | ||
<span class="mt-2">{{ edit_field(_('Change'), url_for(action), for="{} {}".format(_('your'), label.lower())) }}</span> | ||
{% endif %} | ||
</div> | ||
</div> | ||
{% endmacro %} |
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
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