Skip to content

Commit

Permalink
Commit from GitHub Actions (Frontend PR validation)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Dec 19, 2024
1 parent 963eb8e commit 3b33c06
Show file tree
Hide file tree
Showing 23 changed files with 86 additions and 109 deletions.
8 changes: 4 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

version: 2
updates:
- package-ecosystem: "devcontainers"
directory: "/"
schedule:
interval: weekly
- package-ecosystem: "devcontainers"
directory: "/"
schedule:
interval: weekly
10 changes: 5 additions & 5 deletions .github/workflows/canopeum_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ on:
workflow_dispatch: # Allows manual triggers
inputs:
deploy_frontend:
description: 'Deploy the frontend'
description: "Deploy the frontend"
required: true
type: boolean
default: true
deploy_backend:
description: 'Deploy the backend'
description: "Deploy the backend"
required: true
type: boolean
default: true
Expand All @@ -30,7 +30,7 @@ on:
jobs:
GetDateTime:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' || (inputs.deploy_frontend && inputs.deploy_backend) }}
if: ${{ github.event_name == 'push' || (inputs.deploy_frontend && inputs.deploy_backend) }}
outputs:
DATETIME: ${{ steps.datetime.outputs.DATETIME }}
steps:
Expand All @@ -41,7 +41,7 @@ jobs:
BuildFrontend:
name: Build & Deploy Frontend
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' || inputs.deploy_frontend }}
if: ${{ github.event_name == 'push' || inputs.deploy_frontend }}
needs: [GetDateTime]
defaults:
run:
Expand Down Expand Up @@ -70,7 +70,7 @@ jobs:
BuildBackend:
name: Build & Deploy Backend
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' || inputs.deploy_backend }}
if: ${{ github.event_name == 'push' || inputs.deploy_backend }}
needs: [GetDateTime]
defaults:
run:
Expand Down
12 changes: 6 additions & 6 deletions canopeum_frontend/src/App.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
// We can also later override its css vars
// TODO: Strongly consider to stop using rsuite, we have too many co-existing design systems !
// (rsuite + mui + bootstrap)
@use '../node_modules/rsuite/dist/rsuite.min.css';
@use "../node_modules/rsuite/dist/rsuite.min.css";

// Load variables before Bootsrap so it generates the right theme colors
@forward './assets/styles/Variables.scss';
@use './assets/styles/Variables.scss' as *;
@forward "./assets/styles/Variables.scss";
@use "./assets/styles/Variables.scss" as *;

@use '../node_modules/bootstrap/scss/bootstrap' with (
@use "../node_modules/bootstrap/scss/bootstrap" with (
$font-family-sans-serif: $font-family-sans-serif,
$font-family-monospace: $font-family-monospace,
$font-family-base: $font-family-base,
Expand All @@ -31,8 +31,8 @@
$gray-300: $gray-300,
$gray-600: $gray-600,
$gray-800: $gray-800,
$gray-900: $gray-900
$gray-900: $gray-900,
);

// insert our theme's global styles after so we can use its variables
@use './assets/styles/GlobalStyles.scss';
@use "./assets/styles/GlobalStyles.scss";
6 changes: 3 additions & 3 deletions canopeum_frontend/src/assets/styles/Buttons.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use '../../../node_modules/bootstrap/scss/bootstrap.scss' as *;
@use "../../../node_modules/bootstrap/scss/bootstrap.scss" as *;

/*
Override button-variant node_modules/bootstrap/scss/mixins/_buttons.scss
Expand All @@ -20,9 +20,9 @@ however we still prefer the lighter color for our secondary buttons

.unstyled-button {
border: none;
padding: inherit;
background-color: inherit;
background: inherit;
background-color: inherit;
padding: inherit;
}

button.icon-button {
Expand Down
2 changes: 1 addition & 1 deletion canopeum_frontend/src/assets/styles/Card.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use '../../../node_modules/bootstrap/scss/bootstrap.scss' as *;
@use "../../../node_modules/bootstrap/scss/bootstrap.scss" as *;

// Override rsuite css vars to fit our style
:root {
Expand Down
2 changes: 1 addition & 1 deletion canopeum_frontend/src/assets/styles/DropdownMenu.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use 'Variables.scss' as *;
@use "Variables.scss" as *;

.rs-dropdown-item-submenu:hover > .rs-dropdown-item-toggle,
.rs-dropdown-item.rs-dropdown-item-focus,
Expand Down
22 changes: 11 additions & 11 deletions canopeum_frontend/src/assets/styles/GlobalStyles.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
@use 'Variables.scss' as *;
@use "Variables.scss" as *;

// TODO (Sam. T): Move this file to a GlobalStyles/_index.scss and imported files into same folder
@use 'Buttons.scss';
@use 'Card.scss';
@use 'DropdownMenu.scss';
@use 'Icons.scss';
@use 'Nav.scss';
@use 'Transitions.scss';
@use "Buttons.scss";
@use "Card.scss";
@use "DropdownMenu.scss";
@use "Icons.scss";
@use "Nav.scss";
@use "Transitions.scss";

::-webkit-scrollbar {
width: 0.5em;
Expand All @@ -17,12 +17,12 @@
}

::-webkit-scrollbar-thumb {
background-color: $gray-600; // map-get($colors, gray)
border-radius: 5px;
background-color: $gray-600; // map-get($colors, gray)
}

body {
background-image: url('@assets/images/TreeBackground.png');
background-image: url("@assets/images/TreeBackground.png");
}

// Causes teh inner elements of an anchor to be underlined instead of the anchor itself
Expand All @@ -44,9 +44,9 @@ body {
}

.text-ellipsis {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

.lightgreen-color {
Expand All @@ -58,9 +58,9 @@ body {
}

.page-container {
margin: 0 auto;
padding: 1rem 1rem;
max-width: 90em;
margin: 0 auto;
}

@media screen and (min-width: $medium-width) {
Expand Down
6 changes: 1 addition & 5 deletions canopeum_frontend/src/assets/styles/Icons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,6 @@
}

&.fill-icon {
font-variation-settings:
'FILL' 1,
'wght' 700,
'GRAD' 0,
'opsz' 48;
font-variation-settings: "FILL" 1, "wght" 700, "GRAD" 0, "opsz" 48;
}
}
15 changes: 5 additions & 10 deletions canopeum_frontend/src/assets/styles/Nav.scss
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
@use '../../../node_modules/bootstrap/scss/bootstrap.scss' as *;
@use "../../../node_modules/bootstrap/scss/bootstrap.scss" as *;

.nav-underline {
.nav-link {
// underline on hover just looks weird if there's already an underline from nav
text-decoration: none;

// By default bootstrap gives those 0 padding, restore the .nav-link padding
padding-right: var(--bs-nav-link-padding-x);
padding-left: var(--bs-nav-link-padding-x);
// underline on hover just looks weird if there's already an underline from nav
text-decoration: none;
}
}

Expand All @@ -20,11 +19,7 @@
}

.nav-item.active .material-symbols-outlined {
font-variation-settings:
'FILL' 1,
'wght' 700,
'GRAD' 0,
'opsz' 48;
font-variation-settings: "FILL" 1, "wght" 700, "GRAD" 0, "opsz" 48;
}

.nav-link {
Expand Down Expand Up @@ -88,7 +83,7 @@ with colors of .navbar-dark in node_modules/bootstrap/scss/_navbar.scss
to support non-navbar nav
*/
.nav-dark.nav-dark,
.nav.nav[data-bs-theme='dark'] {
.nav.nav[data-bs-theme="dark"] {
// scss-docs-start nav-dark-css-vars
--#{$prefix}nav-link-color: #{$navbar-dark-color};
--#{$prefix}nav-link-hover-color: #{$navbar-dark-hover-color};
Expand Down
43 changes: 16 additions & 27 deletions canopeum_frontend/src/assets/styles/Variables.scss
Original file line number Diff line number Diff line change
@@ -1,23 +1,12 @@
/*
* Bootstrap variables
*/
* Bootstrap variables
*/

$font-family-sans-serif: (
-apple-system,
BlinkMacSystemFont,
'Lato',
Roboto,
'Helvetica Neue',
Arial,
sans-serif
-apple-system, BlinkMacSystemFont, "Lato", Roboto, "Helvetica Neue", Arial, sans-serif
);
$font-family-monospace: (
'Helvetica Neue',
Monaco,
Consolas,
'Liberation Mono',
'Courier New',
monospace
"Helvetica Neue", Monaco, Consolas, "Liberation Mono", "Courier New", monospace
);
$font-family-base: $font-family-sans-serif;
$headings-font-family: Lato;
Expand All @@ -31,23 +20,23 @@ $nav-underline-border-width: 0.2rem;
$navbar-nav-link-padding-x: 1.125rem;
$nav-link-padding-y: $navbar-nav-link-padding-x - $nav-underline-border-width;

$primary: #007e51;
$secondary: #f18200;
$success: #06c270;
$info: #0063f7;
$warning: #ffcc00;
$danger: #ff3b3b;
$primary: #007E51;
$secondary: #F18200;
$success: #06C270;
$info: #0063F7;
$warning: #FFCC00;
$danger: #FF3B3B;

$white: #fffaf5; // Most bg colors
$gray-100: #fffaf5; // Used for $light: Light text color
$white: #FFFAF5; // Most bg colors
$gray-100: #FFFAF5; // Used for $light: Light text color
$gray-300: #969696; // Used for $border-color: Input border color (and used by $body-color-dark)
$gray-600: #969696; // aka map-get($colors, gray)
$gray-800: #616161; // aka map-get($colors, dark-gray)
$gray-900: #433a2e; // Used for $dark and $body-color: Body text color
$gray-900: #433A2E; // Used for $dark and $body-color: Body text color

/*
* Custom variables
*/
* Custom variables
*/

// TODO (Sam T.): We should try to configure and properly use Bootstrap breakpoints instead
$small-width: 540px;
Expand All @@ -59,4 +48,4 @@ $xxlarge-width: 1600px;
// TODO (Sam T.): We should configure bootstrap so that
// our primary-derived color this represents uses the right shade of green.
// Then use the generated bootstrap scss variable instead of $lightgreen
$lightgreen: #e8f3e9;
$lightgreen: #E8F3E9;
4 changes: 2 additions & 2 deletions canopeum_frontend/src/assets/styles/export.module.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use 'Variables.scss' as *;
@use "Variables.scss" as *;

// Re-export variables to be accessible from .ts
// This is useful to mix frameworks like applying bootstrap-defined style to MUI
Expand All @@ -8,5 +8,5 @@
success: $success;
// Would prefer using $card-bg from bootstrap,
// but that causes it to load first before App.scss somehow
cardBackground: $white;
cardbackground: $white;
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
@use '../../assets/styles/Variables.scss' as *;
@use "../../assets/styles/Variables.scss" as *;

.header-card {
flex-direction: column;

.weather-container {
border-radius: $border-radius $border-radius 0 0;
width: 100%;
height: 300px;
background-position: top;
background-size: cover;
background-repeat: no-repeat;
width: 100%;
height: 300px;
}
}

Expand All @@ -18,9 +18,9 @@
flex-direction: row;

.weather-container {
flex-basis: 25%;
border-radius: $border-radius 0 0 $border-radius;
min-width: 256px;
flex-basis: 25%;
height: unset;
}
}
Expand Down
4 changes: 2 additions & 2 deletions canopeum_frontend/src/components/analytics/ImageUpload.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
@use '../../assets/styles/Variables.scss' as *;
@use "../../assets/styles/Variables.scss" as *;

.upload-button:not(:hover) {
// override .btn's var(--bs-btn-bg) to have a solid background instead of transparent
background-color: var(--bs-body-bg);
}

.upload-instruction {
background-color: var(--bs-body-bg);
border-radius: $border-radius;
background-color: var(--bs-body-bg);
padding: 0 0.5rem;
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,16 @@

button {
position: absolute;
right: 8px;
top: 0px;
right: 8px;
}
}

input[type=number].no-spinner {
input[type="number"].no-spinner {
-webkit-appearance: none; // WebKit browsers
appearance: none; // Standard property
-moz-appearance: textfield; // Firefox


&::-webkit-outer-spin-button,
&::-webkit-inner-spin-button {
-webkit-appearance: none;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,18 +89,18 @@ const OptionQuantitySelector = <TValue extends OptionQuantityValueType>(
clearOnBlur
freeSolo
getOptionKey={option => (
typeof (option) === 'string'
typeof option === 'string'
? option
: option.value
)}
getOptionLabel={option => (
typeof (option) === 'string'
typeof option === 'string'
? option
: option.displayText
)}
id={id}
onChange={(_event, option) => {
if (option === null || typeof (option) === 'string') return
if (option === null || typeof option === 'string') return

onSelect(option)
}}
Expand Down
Loading

0 comments on commit 3b33c06

Please sign in to comment.