Skip to content
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

Source Interface Redesign Omnibus #6315

Merged
merged 5 commits into from
May 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@
/var/www/securedrop/journalist_templates/base.html r,
/var/www/securedrop/journalist_templates/col.html r,
/var/www/securedrop/journalist_templates/config.html r,
/var/www/securedrop/journalist_templates/delete.html r,
/var/www/securedrop/journalist_templates/edit_account.html r,
/var/www/securedrop/journalist_templates/error.html r,
/var/www/securedrop/journalist_templates/flashed.html r,
Expand Down Expand Up @@ -223,26 +222,22 @@
/var/www/securedrop/source_app/utils.py r,
/var/www/securedrop/source_templates/base.html r,
/var/www/securedrop/source_templates/error.html r,
/var/www/securedrop/source_templates/first_submission_flashed_message.html r,
/var/www/securedrop/source_templates/flashed.html r,
/var/www/securedrop/source_templates/flash_message.html r,
/var/www/securedrop/source_templates/footer.html r,
/var/www/securedrop/source_templates/generate.html r,
/var/www/securedrop/source_templates/index.html r,
/var/www/securedrop/source_templates/locales.html r,
/var/www/securedrop/source_templates/login.html r,
/var/www/securedrop/source_templates/logout.html r,
/var/www/securedrop/source_templates/lookup.html r,
/var/www/securedrop/source_templates/next_submission_flashed_message.html r,
/var/www/securedrop/source_templates/notfound.html r,
/var/www/securedrop/source_templates/session_timeout.html r,
/var/www/securedrop/source_templates/tor2web-warning.html r,
/var/www/securedrop/source_templates/utils.html r,
/var/www/securedrop/source_templates/use-tor-browser.html r,
/var/www/securedrop/source_templates/utils.html r,
/var/www/securedrop/source_templates/why-public-key.html r,
/var/www/securedrop/static/.webassets-cache/** rw,
/var/www/securedrop/static/css/font-awesome.css r,
/var/www/securedrop/static/css/journalist.css r,
/var/www/securedrop/static/css/normalize.css r,
/var/www/securedrop/static/css/source.css r,
/var/www/securedrop/static/fonts/fa-brands-400.eot r,
/var/www/securedrop/static/fonts/fa-brands-400.svg r,
Expand All @@ -259,20 +254,21 @@
/var/www/securedrop/static/fonts/fa-solid-900.ttf r,
/var/www/securedrop/static/fonts/fa-solid-900.woff r,
/var/www/securedrop/static/fonts/fa-solid-900.woff2 r,
/var/www/securedrop/static/gen/journalist.css rw,
/var/www/securedrop/static/gen/journalist.js rw,
/var/www/securedrop/static/gen/source.css rw,
/var/www/securedrop/static/gen/source.js rw,
/var/www/securedrop/static/i/arrow-upload-blue.png r,
/var/www/securedrop/static/i/arrow-upload-large.png r,
/var/www/securedrop/static/i/arrow-upload-white.png r,
/var/www/securedrop/static/i/check.png r,
/var/www/securedrop/static/i/checkbox.png r,
/var/www/securedrop/static/i/close.png r,
/var/www/securedrop/static/i/material/error.png r,
/var/www/securedrop/static/i/material/info.png r,
/var/www/securedrop/static/i/material/trash.png r,
/var/www/securedrop/static/i/material/trash-outline.png r,
/var/www/securedrop/static/i/info-small.png r,
/var/www/securedrop/static/i/source.png r,
/var/www/securedrop/static/i/torbroom.png r,
/var/www/securedrop/static/i/upload.png r,
/var/www/securedrop/static/i/custom_logo.png rw,
/var/www/securedrop/static/i/delete_gray.png r,
/var/www/securedrop/static/i/delete_red.png r,
/var/www/securedrop/static/i/bang-stop.png r,
/var/www/securedrop/static/i/bang-circle.png r,
/var/www/securedrop/static/i/favicon.png r,
/var/www/securedrop/static/i/modal-x-white.png r,
/var/www/securedrop/static/i/flash-success.png r,
/var/www/securedrop/static/i/flash-error.png r,
/var/www/securedrop/static/i/flash-notification.png r,
Expand All @@ -293,30 +289,11 @@
/var/www/securedrop/static/i/font-awesome/times-white.png r,
/var/www/securedrop/static/i/font-awesome/white/exclamation-circle.svg r,
/var/www/securedrop/static/i/font-awesome/white/guard.svg r,
/var/www/securedrop/static/i/hand_with_fingerprint.png r,
/var/www/securedrop/static/i/languages_arrow.png r,
/var/www/securedrop/static/i/languages_globe.png r,
/var/www/securedrop/static/i/logo.png rw,
/var/www/securedrop/static/i/logo-footer.png r,
/var/www/securedrop/static/i/no16-global.png r,
/var/www/securedrop/static/i/no16.png r,
/var/www/securedrop/static/i/server_upload.png r,
/var/www/securedrop/static/i/star.png r,
/var/www/securedrop/static/i/success_checkmark.png r,
/var/www/securedrop/static/i/tipbox/tipbox-hed-j-all.png r,
/var/www/securedrop/static/i/tipbox/tipbox-hed-j-single.png r,
/var/www/securedrop/static/i/tipbox/tipbox-hed-submit1.png r,
/var/www/securedrop/static/i/tipbox/tipbox-hed-submit3.png r,
/var/www/securedrop/static/i/tipbox/tipbox-hed-user.png r,
/var/www/securedrop/static/i/tipbox/tipbox-logo.png r,
/var/www/securedrop/static/i/torbroom-black.png r,
/var/www/securedrop/static/i/torbroom-coral.png r,
/var/www/securedrop/static/i/trash-x-out.png r,
/var/www/securedrop/static/i/trash-x-solid.png r,
/var/www/securedrop/static/i/un-star.png r,
/var/www/securedrop/static/i/x_icon-button_blue.png r,
/var/www/securedrop/static/i/x_icon-grimace_blue.png r,
/var/www/securedrop/static/i/x_icon-sd_blue.png r,
/var/www/securedrop/static/icons/bell.png r,
/var/www/securedrop/static/icons/check.png r,
/var/www/securedrop/static/icons/chevron-left.png r,
Expand Down
166 changes: 166 additions & 0 deletions securedrop/sass/_source_vars.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
// Colors for "local" referencing.
// Please use descriptive variables stylesheets

// Blue-ish
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this might be a pre-existing problem, but these variable names/colors are kind of useless to me because I would have no clue when to use cerulean vs cyan vs grimace blue, you get the idea.

I like what the Wikimedia Style Guide does with Red90, Red50, Red30, etc.: https://design.wikimedia.org/style-guide/visual-style_colors.html and https://design.wikimedia.org/style-guide/resources/WikimediaUI_color_palette.svg

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My kneejerk reaction to this was "absolutely, and functional descriptions would be even better", but looking ahead in _source_vars.sass, the actual variables using these colors are pretty well-named, and those vars are what actually get used. (I don't know if this modifies your postion at all).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, the color names are partially inherited, some are taken from Figma, some are new because they haven't had a name assigned but popped up often enough (for what it's worth it might be cool to introduce them in Figma as well but I'm better at reading Figma than changing stuff on there). source.sass should never reference those colors directly (which is what "local referencing" is intended to convey - maybe I should expand the comment?)

My general preference would be that developers wouldn't make the (final) choice for what color is used where. Ideally @tina-ux would be involved in the process before implementation happens, but even if that's not possible, a descriptive variable name should be used in source.sass and the final color can be adjusted later on. Does that make sense?

$color_cerulean: #2d99ff
$color_cyan: #05edfe
$color_grimace_blue: #2a319d
$color_lapis: #0065db
$color_lazuli: #045fb4
$color_smurfette: #00c7ff
$color_alice_blue: #f5fafe
$color_wistful: #a4a7d5
$color_lavender: #e4e5f3
$color_ffs_blue: #000c6c
$color_pattens_blue: #c0e1ff

// Red-ish
$color_pig_pink: #ffd6e0
$color_red_ribbon: #d04
$color_urgent_coral: #f36
$color_bubble_gum: #ffc2d2
$color_tickle_me_pink: #ff85a3
$color_illusion: #ff99b3

// Variable Naming scheme:
// $use_[$state_]$decleration[_$detail]

$body_bg: #fff
$body_color: #3d3d3d

$heading_color: #102781
$heading_alt_color: $color_ffs_blue

$bold_color: #000

$link_color: $color_cerulean
$link_border: rgba(0, 117, 247, 0.4)
$link_hover_color: $color_lazuli
$link_hover_border: $link_hover_color

$main_border: #e1e1e1

// Button border order: [box] border_inside > border > shadow

$button_bg: $color_lazuli
$button_color: #fff
$button_hover_bg: $color_lapis
$button_hover_outline: $color_cerulean
$button_active_bg: $button_hover_outline
$button_active_outline: $color_smurfette
$button_focus_bg: $button_hover_outline
$button_focus_border: $color_grimace_blue

$button_secondary_bg: #fff
$button_secondary_border: $button_bg
$button_secondary_color: $button_secondary_border
$button_secondary_hover_border: $button_hover_outline
$button_secondary_hover_color: $button_hover_outline
$button_secondary_hover_outline: #7fe2ff
$button_secondary_active_border: #00C7ff
$button_secondary_active_color: $button_hover_outline
$button_secondary_active_shadow: $button_secondary_active_border
$button_secondary_focus_border: $button_secondary_hover_border
$button_secondary_focus_color: $button_secondary_hover_border

$button_danger_bg: #fff
$button_danger_border: $color_urgent_coral
$button_danger_color: $button_danger_border
$button_danger_hover_border: $color_red_ribbon
$button_danger_hover_color: $button_danger_hover_border
$button_danger_hover_outline: $color_pig_pink
$button_danger_active_border: $button_danger_hover_outline
$button_danger_active_color: $color_illusion
$button_danger_active_outline: $button_danger_hover_border
$button_danger_focus_border: $button_danger_hover_outline
$button_danger_focus_color: $button_danger_hover_border
$button_danger_focus_outline: $button_danger_focus_color

$button_danger_secondary_bg: $color_urgent_coral
$button_danger_secondary_color: #fff
$button_danger_secondary_hover_bg: $color_red_ribbon
$button_danger_secondary_hover_outline: $color_bubble_gum
$button_danger_secondary_active_bg: $color_tickle_me_pink
$button_danger_secondary_active_outline: $button_danger_secondary_bg
$button_danger_secondary_focus_bg: $button_danger_secondary_hover_bg
$button_danger_secondary_focus_border: $button_danger_secondary_bg

$checkbox_checkbox_color: $color_grimace_blue
$checkbox_label_color: #505050
$checkbox_border: $color_lavender
$checkbox_hover_bg: $color_alice_blue
$checkbox_hover_border: $color_wistful
$checkbox_hover_border_inside: #fff

$locale_menu_list_shadow: rgba(0, 0, 0, 0.25)
$locale_menu_item_border: #f0f0f0
$locale_menu_item_hover_bg: $locale_menu_item_border

// Used with: button (primary (default), secondary, danger, icon), checkbox
$focus_shadow: $color_cyan

$flash_color: #3b3b3b
$flash_error_bg: #fff4f7
$flash_error_color: $flash_color
$flash_error_heading_color: $color_urgent_coral
$flash_error_icon_color: $flash_error_heading_color
$flash_success_bg: #f6ffdf
$flash_success_color: $flash_color
$flash_success_heading_color: #00a61b
$flash_success_icon_color: $flash_success_heading_color
$flash_notification_bg: #fffee8
$flash_notification_color: #000
$flash_notification_heading_color: $flash_notification_color
$flash_notification_icon_color: $color_lazuli

$info_bg: $flash_notification_bg
$info_color: $flash_notification_color
$info_icon_color: $flash_notification_icon_color

$passphrase_bg: #fafcff
$passphrase_color: $checkbox_checkbox_color
$passphrase_border: #fff
$passphrase_masked_color: #d0d3eb
$passphrase_icon_color: $color_grimace_blue
$passphrase_shadow: rgba(121, 134, 169, 0.33)

$passphrase_input_border: #757575
$passphrase_input_inner_shadow: rgba(0, 0, 0, 0.02)
$passphrase_input_placeholder_color: #817b8e
$passphrase_input_focus_border: #007aff
$passphrase_input_focus_outline: #fff
$passphrase_input_focus_shadow: #c1e3ff

$form_attachment_bg: linear-gradient(115deg, #fbfcff, #f3f7fb)
$form_attachment_input_bg: rgba(0,0,0,0.05)
$form_attachment_icon_color: #d9dce4
$form_fields_border: #c3c3c3

$reply_bg: #fcfcfc
$reply_border: #ededed
$reply_time_bg: #f4f4f4
$reply_time_color: #3c3c3c
$reply_noreply_bg: #f8f8f8
$reply_noreply_color: #9e9e9e

$modal_background_bg: rgba(0,0,0,0.3)
$modal_bg: #fff
$modal_border: $color_lazuli
$modal_close_icon_bg: $color_ffs_blue
$modal_close_icon_hover_bg: $color_lazuli
$modal_close_icon_hover_outline: $color_pattens_blue

$reply_delete_icon_color: $color_urgent_coral
$reply_delete_icon_hover_color: $color_red_ribbon
$reply_delete_icon_hover_outline: $color_pig_pink
$reply_delete_icon_focus_color: $reply_delete_icon_hover_color
$reply_delete_icon_active_color: $reply_delete_icon_color

$footer_border: #d0d0d0
$footer_fpf_color: #9d9cbd

$warning_browser_bg: #813a81
$warning_browser_color: #fff
$warning_browser_dialog_border: #666

$index_middle_separator: #e9eaf5
Loading