Skip to content

Commit

Permalink
portalicious: theming feedback
Browse files Browse the repository at this point in the history
AB#32473
  • Loading branch information
aberonni committed Jan 22, 2025
1 parent 0058baa commit 7e13f58
Show file tree
Hide file tree
Showing 30 changed files with 243 additions and 75 deletions.
9 changes: 9 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@
"source.fixAll.eslint": "explicit",
"source.removeUnusedImports": "explicit"
},
"tailwindCSS.rootFontSize": 14,
"tailwindCSS.showPixelEquivalents": true,
"tailwindCSS.classAttributes": [
"class",
"styleClass",
"icon",
"ngClass",
"class:list"
],
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true,
// The following setting is necessary to avoid false negatives in the VSCode Angular Language
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import RegistrationsPage from '@121-e2e/portalicious/pages/RegistrationsPage';
const sendingMessageToast =
'Closing this notification will not cancel message sending.';
const englishMessageTemplate =
'This is a message from the Red Cross. Thanks for registering. From now on you will receive an Albert Heijn voucher via WhatsApp every Tuesday. You will receive the vouchers as long as you are on the list of . The Red Cross can also provide you with information about, for example, medical assistance, food or safety. Check out our website: https://helpfulinformation.redcross.nl/ or ask your question via WhatsApp: https://wa.me/3197010286964';
'This is a message from the Red Cross.\n\nThanks for registering. From now on you will receive an Albert Heijn voucher via WhatsApp every Tuesday. You will receive the vouchers as long as you are on the list of .\n\nThe Red Cross can also provide you with information about, for example, medical assistance, food or safety. Check out our website:\n\nhttps://helpfulinformation.redcross.nl/\n\nor ask your question via WhatsApp:\n\nhttps://wa.me/3197010286964';
const dutchMessageTemplate =
'Dit is een bericht van het Rode Kruis. Bedankt voor je inschrijving. Je ontvangt vanaf nu elke dinsdag een Albert Heijn waardebon via WhatsApp. Je ontvangt de waardebonnen zo lang je op de lijst staat van . Het Rode Kruis kan je ook informatie geven over bijvoorbeeld medische hulp, voedsel of veiligheid. Kijk op onze website: https://helpfulinformation.redcross.nl/ of stel je vraag via WhatsApp: https://wa.me/3197010286964';
'Dit is een bericht van het Rode Kruis.\n\nBedankt voor je inschrijving. Je ontvangt vanaf nu elke dinsdag een Albert Heijn waardebon via WhatsApp. Je ontvangt de waardebonnen zo lang je op de lijst staat van .\n\nHet Rode Kruis kan je ook informatie geven over bijvoorbeeld medische hulp, voedsel of veiligheid. Kijk op onze website:\n\nhttps://helpfulinformation.redcross.nl/\n\nof stel je vraag via WhatsApp:\n\nhttps://wa.me/3197010286964';

test.beforeEach(async ({ page }) => {
await resetDB(SeedScript.nlrcMultiple);
Expand Down
2 changes: 1 addition & 1 deletion interfaces/Portalicious/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"eslint.format.enable": true,
"css.customData": [".vscode/tailwind.json"],
"tailwindCSS.rootFontSize": 14,
"tailwindCSS.showPixelEquivalents": false,
"tailwindCSS.showPixelEquivalents": true,
"tailwindCSS.classAttributes": [
"class",
"styleClass",
Expand Down
2 changes: 2 additions & 0 deletions interfaces/Portalicious/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ module.exports = tseslint.config(
'ng-container[slot]',
'p-button[icon]',
'p-button[iconPos]',
'p-button[size]',
'p-columnFilter[display]',
'p-drawer[position]',
'p-fileUpload[accept]',
Expand All @@ -141,6 +142,7 @@ module.exports = tseslint.config(
'styleClass',
'severity',
'th[pSortableColumn]',
'app-button-menu[size]',
'app-colored-chip[variant]',
'app-confirmation-dialog[headerClass]',
'app-confirmation-dialog[headerIcon]',
Expand Down
115 changes: 111 additions & 4 deletions interfaces/Portalicious/src/app/app.theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ const AppTheme = definePreset(Aura, {
hoverColor: colors.purple.DEFAULT,
},
text: {
color: colors.black.DEFAULT,
hoverColor: colors.purple.DEFAULT,
},
highlight: {
Expand All @@ -64,12 +65,16 @@ const AppTheme = definePreset(Aura, {
focusColor: colors.purple.DEFAULT,
},
formField: {
hoverBorderColor: colors.purple.DEFAULT,
color: colors.black.DEFAULT,
focusBorderColor: colors.purple[500],
hoverBorderColor: colors.purple[500],
invalidBorderColor: colors.red[500],
invalidPlaceholder: colors.red[500],
},
navigation: {
item: {
iconColor: colors.black.DEFAULT,
iconFocusColor: colors.purple.DEFAULT,
focusBackground: colors.purple[100],
activeBackground: colors.purple[100],
},
Expand All @@ -79,12 +84,73 @@ const AppTheme = definePreset(Aura, {
focusRing: {
color: colors.purple.DEFAULT,
},
borderRadius: {
// used by cards
xl: '1.125rem',
},
},
components: {
button: {
text: {
primary: {
color: colors.black.DEFAULT,
paddingX: '1.125rem',
paddingY: '0.6rem',
sm: {
paddingX: '1rem',
paddingY: '0.25rem',
},
colorScheme: {
light: {
primary: {
hover: {
background: colors.purple[600],
},
active: {
background: colors.purple[900],
},
},
outlined: {
primary: {
hover: {
background: colors.purple[100],
},
active: {
background: colors.white,
color: colors.purple[900],
},
},
contrast: {
hover: {
background: colors.grey[100],
},
active: {
background: colors.white,
},
},
},
text: {
primary: {
color: colors.black.DEFAULT,
},
},
},
},
},
card: {
shadow: tailwindConfig.theme.extend.boxShadow.cards,
},
datatable: {
body: {
cell: {
padding: '0.625rem 1rem',
},
},
colorScheme: {
light: {
row: {
hover: {
background: colors.white,
color: colors.black.DEFAULT,
},
},
},
},
},
Expand All @@ -93,6 +159,47 @@ const AppTheme = definePreset(Aura, {
light: severityVariants,
},
},
radiobutton: {
colorScheme: {
light: {
icon: {
checked: {
color: colors.purple.DEFAULT,
hover: {
color: colors.purple.DEFAULT,
},
},
},
checked: {
background: colors.white,
hover: {
background: colors.white,
},
},
},
},
},
scrollpanel: {
colorScheme: {
light: {
bar: {
background: colors.grey[700],
},
},
},
bar: {
size: '0.5rem',
},
},
tabs: {
tab: {
color: colors.black.DEFAULT,
hover: {
color: colors.grey[700],
borderColor: colors.grey[700],
},
},
},
toast: {
colorScheme: {
light: severityVariants,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<dl class="grid grid-cols-2 items-stretch gap-4 border-t border-grey-300">
<dl class="grid grid-cols-2 items-stretch gap-x-6 border-t border-grey-300">
@for (metric of summaryMetrics(); track metric) {
<app-metric-container [metric]="metric"></app-metric-container>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export class ColoredChipComponent {
case 'green':
return `${baseClass} bg-green-100 text-green-700`;
case 'purple':
return `${baseClass} bg-purple-100 text-purple-700`;
return `${baseClass} bg-purple-100 text-purple-900`;
case 'red':
return `${baseClass} bg-red-100 text-red-700`;
case 'orange':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ <h3 [class]="headerClass()">
<p-button
icon="pi pi-times"
class="ms-auto"
severity="secondary"
severity="contrast"
text
(click)="confirmDialog.onReject()"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
type="submit"
rounded
[loading]="mutation().isPending()"
styleClass="w-1/2"
/>
</div>
</form>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="flex h-full flex-col">
<dt class="px-2 pb-2 pt-2 txt-body-m">
<dt class="px-2 pb-2 pt-5 text-grey-700 txt-body-m">
{{ metric().label }}
</dt>
<dd class="mt-auto border-b border-grey-300 px-2 pb-2 font-bold txt-h-2">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@
i18n-label="Top-right user-menu@@header-user-menu"
[icon]="'pi pi-user'"
[menuItems]="userMenuOptions()"
class="[&_.p-button-label]:duration-0 [&_button:focus]:bg-white [&_button:not(:hover,:focus)]:text-white"
class="[&_.p-button-label]:font-semibold [&_.p-button-label]:duration-0 [&_.p-button-label]:txt-body-m [&_button:focus]:bg-white [&_button:not(:hover,:focus)]:text-white"
[plain]="true"
[text]="true"
[size]="'small'"
size="small"
>
<p
menu-start
class="mb-2 border-b border-b-grey-300 px-3 py-2"
>
<ng-container i18n>
Logged in as: <strong>{{ userName() }}</strong>
Logged in as:<br />{{ userName() }}
</ng-container>
</p>
</app-button-menu>
Expand All @@ -59,7 +59,7 @@
[pFocusTrapDisabled]="!sidebarVisible()"
[tabIndex]="-1"
>
<div>
<div class="p-drawer-header p-0">
<p-button
label="Close"
i18n-label="@@generic-close"
Expand Down Expand Up @@ -114,7 +114,7 @@
</div>
<div class="px-6">
<app-language-switcher />
<small class="block text-center text-grey-500">
<small class="block pb-2 text-center text-grey-500">
<app-health-widget />
</small>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export class HeaderComponent {
userMenuOptions = computed<MenuItem[]>(() => [
{
label: $localize`:Menu-item:Change password`,
icon: 'pi pi-cog',
icon: 'pi pi-key',
routerLink: `/${AppRoutes.changePassword}`,
visible: !!this.authService.ChangePasswordComponent,
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div
class="w-full bg-white px-6 pt-1 shadow-project-menu lg:px-24 [&_.p-tablist-tab-list]:border-transparent [&_.p-tablist-tab-list_.p-tab:not(.p-tab-active)]:border-transparent"
class="w-full bg-white px-6 pt-1 shadow-project-menu lg:px-24 [&_.p-tablist-tab-list]:border-transparent [&_.p-tablist-tab-list_.p-tab:not(.p-tab-active):not(:hover)]:border-transparent"
data-testid="project-header"
>
<app-tabs-menu [menuItems]="navMenuItems()" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
icon="pi pi-cog"
(click)="showColumnManagement()"
text
severity="secondary"
size="large"
severity="contrast"
title="Manage table"
i18n-title="@@query-table-manage-table"
aria-label="Manage table"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
icon="pi pi-times"
(click)="filterChange.emit(undefined)"
text
severity="secondary"
severity="contrast"
class="absolute end-0 top-1/2 -translate-y-1/2"
styleClass="bg-transparent hover:text-purple-700 focus:text-purple-700"
/>
Expand All @@ -31,7 +31,8 @@
icon="pi pi-search"
(click)="globalFilterVisible.set(true)"
text
severity="secondary"
severity="contrast"
size="large"
title="Filter by keyword"
i18n-title="@@table-quick-search"
aria-label="Filter by keyword"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
[filterDelay]="serverSideFiltering() ? 500 : 0"
[filterLocale]="locale"
(onFilter)="selectAll.set(false)"
[rowHover]="contextMenuItems()"
[sortField]="initialSortField()"
[sortOrder]="initialSortOrder()"
[contextMenu]="contextMenu()"
Expand Down Expand Up @@ -161,7 +160,12 @@
let-item
let-expanded="expanded"
>
<tr [pContextMenuRow]="item">
<tr
[pContextMenuRow]="item"
[ngClass]="{
'bg-purple-50': expanded,
}"
>
@if (enableSelection()) {
<td style="width: 0">
@if (selectAll()) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import { DatePipe, NgComponentOutlet, NgTemplateOutlet } from '@angular/common';
import {
DatePipe,
NgClass,
NgComponentOutlet,
NgTemplateOutlet,
} from '@angular/common';
import {
ChangeDetectionStrategy,
Component,
Expand Down Expand Up @@ -112,6 +117,7 @@ export type QueryTableSelectionEvent<TData> = { selectAll: true } | TData[];
QueryTableGlobalSearchComponent,
QueryTableColumnManagementComponent,
NgTemplateOutlet,
NgClass,
],
providers: [ToastService],
templateUrl: './query-table.component.html',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const REGISTRATION_STATUS_ICON: Record<RegistrationStatusEnum, string> =
[RegistrationStatusEnum.validated]: 'pi pi-check-circle',
[RegistrationStatusEnum.included]: 'pi pi-check',
[RegistrationStatusEnum.paused]: 'pi pi-pause',
[RegistrationStatusEnum.declined]: 'pi pi-times',
[RegistrationStatusEnum.declined]: 'pi pi-ban',
[RegistrationStatusEnum.deleted]: 'pi pi-trash',
};

Expand Down
Loading

0 comments on commit 7e13f58

Please sign in to comment.