Skip to content

Commit

Permalink
Merge pull request #344 from Bixal/release/1.7.0
Browse files Browse the repository at this point in the history
Release/1.7.0
  • Loading branch information
mattsqd authored Nov 13, 2024
2 parents 6abc2e7 + d944ef5 commit a42d83a
Show file tree
Hide file tree
Showing 27 changed files with 1,007 additions and 387 deletions.
1 change: 1 addition & 0 deletions .lando.dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ tooling:
- 'drush default-content:export-references menu_link_content --folder=modules/custom/bixal_default_content/content'
- 'drush default-content:export-references media --folder=modules/custom/bixal_default_content/content'
- 'drush default-content:export-references config_pages --folder=modules/custom/bixal_default_content/content'
- 'drush default-content:export-references sitewide_alert --folder=modules/custom/bixal_default_content/content'
patch:
service: appserver
description: Apply composer patches or regenerate lock hash.
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
"drupal/disable_user_1_edit": "^1.6",
"drupal/email_username": "^1.0",
"drupal/field_group": "^3.4",
"drupal/file_resup": "^2.0",
"drupal/google_tag": "^2.0",
"drupal/imagecache_external": "^3.0",
"drupal/key": "^1.19",
Expand Down
745 changes: 401 additions & 344 deletions composer.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions composer.log
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,4 @@ c844a0df1fb652429755003179a5177c|Matt Poole|feature/BSD-305-dep-update|Tue Oct 1
887db95451678c154f246321d8883647|Matt Poole|feature/BSD-305-dep-update|Tue Oct 15 16:03:26 EDT 2024|./composer.sh require drupal/autocomplete_deluxe
56ccb5a257914e0eced9c581db3dc19d|Matt Poole|release/1.5.0|Wed Oct 16 09:17:37 EDT 2024|./composer.sh update
835eac30efa74f467f99dea027b5e553|Matt Poole|feature/BSD-329-site-wide-alert-be|Fri Nov 1 15:48:57 EDT 2024|./composer.sh require drupal/sitewide_alert
79be0192ea4e882a1cf2b73eb098c76e|Matt Poole|feature/BSD-342-update-deps|Wed Nov 13 14:23:04 EST 2024|./composer.sh update
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,6 @@ content:
placeholder: ''
third_party_settings: { }
field_no_icon:
type: boolean_checkbox
weight: 3
region: content
settings:
display_label: true
third_party_settings: { }
field_slim:
type: boolean_checkbox
weight: 2
region: content
Expand All @@ -46,5 +39,6 @@ content:
placeholder: ''
third_party_settings: { }
hidden:
field_slim: true
langcode: true
user_id: true
2 changes: 2 additions & 0 deletions config/sync/core.extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ module:
field_group: 0
field_ui: 0
file: 0
file_resup: 0
file_resup_media_library: 0
filter: 0
google_tag: 0
image: 0
Expand Down
10 changes: 8 additions & 2 deletions config/sync/field.field.media.video.field_media_video_file.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ dependencies:
- media.type.video
module:
- file
- file_resup
third_party_settings:
file_resup:
enabled: 1
max_upload_size: '4 GB'
auto_upload: 0
id: media.video.field_media_video_file
field_name: field_media_video_file
entity_type: media
Expand All @@ -21,7 +27,7 @@ settings:
handler: 'default:file'
handler_settings: { }
file_directory: '[date:custom:Y]-[date:custom:m]'
file_extensions: 'mp4 webm'
max_filesize: '300 MB'
file_extensions: 'mp4 webm m4v'
max_filesize: ''
description_field: false
field_type: file
3 changes: 2 additions & 1 deletion config/sync/metatag.settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ _core:
entity_type_groups: { }
separator: ''
tag_trim_method: beforeValue
use_maxlength: true
tag_trim_maxlength: { }
tag_scroll_max_height: ''
use_maxlength: true
tag_trim_end: '|.,-:;/+&([{"'''
2 changes: 1 addition & 1 deletion config/sync/sitewide_alert.settings.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
_core:
default_config_hash: 0y_QHS2RsEHVusPnhiEqDUshLy8-YqDaXtafZJdYjXA
show_on_admin: 0
alert_styles: "info|Info\r\nemergency|Emergency"
alert_styles: "info|Info\r\nwarning|Warning\r\nurgent|Urgent"
display_order: ascending
refresh_interval: 15
automatic_refresh: 0
Expand Down
7 changes: 7 additions & 0 deletions config/sync/user.role.site_admin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ dependencies:
- config_pages
- contact
- cookies
- file_resup
- google_tag
- path
- pathauto
- recaptcha
- redirect
- role_delegation
- sitewide_alert
- system
- toolbar
id: site_admin
Expand All @@ -23,20 +25,25 @@ is_admin: null
permissions:
- 'access administration pages'
- 'access toolbar'
- 'add sitewide alert entities'
- 'administer CAPTCHA settings'
- 'administer contact forms'
- 'administer cookies services and service groups'
- 'administer file resup'
- 'administer google_tag_container'
- 'administer pathauto'
- 'administer recaptcha'
- 'administer redirect settings'
- 'administer redirects'
- 'administer sitewide alert entities'
- 'administer url aliases'
- 'administer users'
- 'assign editor role'
- 'configure cookies config'
- 'configure cookies widget texts'
- 'create url aliases'
- 'delete sitewide alert entities'
- 'edit accreditations config page entity'
- 'edit sitewide alert entities'
- 'use admin toolbar search'
- 'view the administration theme'
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"start": "npm run storybook",
"storybook": "storybook dev -p 80",
"storybook:local": "storybook dev -p 5050",
"build-storybook": "storybook build"
"build-storybook": "storybook build",
"static-sb": "npm run build-storybook && npx http-server storybook-static/"
},
"repository": {
"type": "git",
Expand Down
2 changes: 2 additions & 0 deletions stories/_index.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Add any custom component files here using @forward.
@forward "components/alert/alert";
@forward "components/blurb/blurb";
@forward "components/button/button";
@forward "components/cards/cards";
Expand All @@ -12,6 +13,7 @@
@forward "components/people-list/people-list";
@forward "components/profile/profile";
@forward "components/section/section";
@forward "components/site-alert/site-alert";
@forward "components/social-nav/social-nav";
@forward "assets/styles/global/global";

Expand Down
19 changes: 18 additions & 1 deletion stories/assets/styles/global/global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ $c-purple: #7d0096;
$c-green: #deec1c;
$c-maroon: #55052a;
$c-orange: #fda307;
$c-yellow: color("yellow-20v");
$c-red-orange: #e02f00;
$c-gray: color("gray-4");

$font-ui: "proxima-nova", "Proxima Nova", Arial, Helvetica, sans-serif;
$font-heading: "novel-pro", Georgia, Times, "Times New Roman", serif;

:root {
// Theme colors
--c-primary: #{$c-blue--dark};
--c-primary-alt: #{$c-purple};
--c-accent-cool: #{$c-blue--light};
Expand All @@ -25,14 +27,29 @@ $font-heading: "novel-pro", Georgia, Times, "Times New Roman", serif;
--c-accent-warm-dark: #{$c-maroon};
--c-accent-vivid: #{$c-green};
--c-base: #{$c-gray};
// State colors
// Info - Closest USWDS color is blue-cool-10v.
--c-info: var(--c-accent-cool);
--c-info-dark: #{color("blue-cool-20v")};
--c-info-darker: #{color("blue-cool-30v")};
// Warning
--c-warning: #{$c-yellow};
// Error
--c-error: #{color("orange-warm-50v")};
// Urgent
--c-urgent: #{color("orange-warm-70v")};
// Fonts
--font-heading: #{$font-heading};
--font-ui: #{$font-ui};
}

// Modern normalize - CSS Reset.
@import url("https://cdnjs.cloudflare.com/ajax/libs/modern-normalize/2.0.0/modern-normalize.min.css");

// Proxima Nova and Novel pro typefaces.
// Typefaces:
// Proxima Nova (400, 600, 700)
// Novel pro (700 & 800)
// poynter-gothic-text (400, 400 italic, 700, 700 italic)
@import url("https://use.typekit.net/wfu7yyr.css");

// ==========================================================================
Expand Down
33 changes: 33 additions & 0 deletions stories/assets/styles/utils/mixins/_alert-base-styles.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
@use "uswds-core" as *;

/// Applies shared base styles to alert and site alert components.
///
/// @example
/// .bix-alert {
/// @include alert-base-styles;
/// }
///
/// This mixin assumes the following structure:
/// - `.alert__heading` contains the heading text.
/// - `.alert__icon` contains the icon element.
/// - `.alert__text` contains the main text content.
@mixin alert-base-styles {
&__heading {
display: flex;
align-items: flex-start;
column-gap: units("05");
font-family: var(--font-ui);
font-weight: 600;
margin-top: 0;
}

&__icon {
display: inline-flex;
align-items: center;
margin-left: calc(#{units(-4)} + #{units("05")}); // Offset column gap.
}

&__text > :last-child {
margin-bottom: 0;
}
}
47 changes: 47 additions & 0 deletions stories/components/alert/alert.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{#
/**
* Alert component.
*
* Available variables:
* - variant: String alert type: info, error, warning.
* - icon: String alert icon from USWDS: info, error, warning.
* - heading_type: Optional string for the type of header (h1-h6).
* - title: Optional string for the alert header.
* - text: A string of the alert body text.
**/
#}


{% set heading_type = heading_type | default("h4") %}

{% if attributes is empty %}
{% set attributes = create_attribute() %}
{% endif %}

{% set alert_classes = [
"bix-alert",
(variant ? "bix-alert--" ~ variant),
] | merge(additional_classes | default([])) %}

<div{{ attributes.addClass(alert_classes) }}>
<div class="bix-alert__body">


{% if title %}
<{{ heading_type }} class="bix-alert__heading">
{% if icon %}
<span class="bix-alert__icon">
{{ source(icon) }}
</span>
{% endif %}

{{ title }}
</{{ heading_type }}>
{% endif %}
{% if text %}
<div class="bix-alert__text">
{{ text }}
</div>
{% endif %}
</div>
</div>
27 changes: 27 additions & 0 deletions stories/components/alert/alert.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
@use "uswds-core" as *;
@use "../../assets/styles/utils/mixins/alert-base-styles" as *;

.bix-alert {
@include alert-base-styles;

--_alert-color: var(--alert-color, currentColor);

border-left: 4px solid var(--_alert-color);

&__body {
padding: units(1.5) units(2.5);
padding-left: units(5);
}
}

.bix-alert--info {
--alert-color: var(--c-info-darker);
}

.bix-alert--warning {
--alert-color: var(--c-warning);
}

.bix-alert--error {
--alert-color: var(--c-error);
}
59 changes: 59 additions & 0 deletions stories/components/alert/alert.stories.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import Alert from "./alert.html.twig";
import "./alert.scss";
import infoIcon from "@uswds/uswds/img/usa-icons/info_outline.svg";
import warningIcon from "@uswds/uswds/img/usa-icons/warning.svg";
import errorIcon from "@uswds/uswds/img/usa-icons/error_outline.svg";

export default {
title: "Components/Alert",
tags: ["autodocs"],
component: Alert,
};

const defaultContent = {
title: "Important Notice for Applicants",
text: `
<p>
At Bixal, we want to ensure a transparent and secure application process for all candidates. Please note that:
</p>
<ul>
<li>Our recruiters will never request sensitive personal information (such as social security numbers or banking information).</li>
<li>Our messages will never include requests to download applications or attachments.</li>
<li>Legitimate recruitment communications will always include clear contact details and may reference our public job postings.</li>
</ul>
<p>
If you experience any challenges with your submission or need assistance in completing your application for accessibility purposes, please reach out to us. <strong><a href="mailto:[email protected]">We're here to help</a></strong>!
</p>
`,
};

export const Default = {
args: {
heading_type: null,
...defaultContent,
},
};

export const Info = {
args: {
...defaultContent,
icon: infoIcon,
variant: "info",
},
};

export const Warning = {
args: {
...defaultContent,
icon: warningIcon,
variant: "warning",
},
};

export const Error = {
args: {
...defaultContent,
icon: errorIcon,
variant: "error",
},
};
Loading

0 comments on commit a42d83a

Please sign in to comment.