Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
696d56a
Layout for application created, documentation added.
mroki58 Jun 16, 2025
1a45249
First idea for running test container. Created image with dockerfile…
mroki58 Jun 17, 2025
38f90ed
Session data taken correctly but it rerenders page again which throws…
mroki58 Jun 18, 2025
6b93174
Merge branch 'dev' into feature/TKN/OGUI-1711/implement-overall-layout
mroki58 Aug 20, 2025
6faffd1
- Added eslint configuration with established assumptions
mroki58 Aug 21, 2025
8231106
Merge remote-tracking branch 'origin/dev' into feature/TKN/OGUI-1724/…
mroki58 Aug 22, 2025
3374b5b
- Moved test files for UI to webapp folder
mroki58 Aug 22, 2025
8643941
Merge branch 'feature/TKN/OGUI-1711/implement-overall-layout' into fe…
mroki58 Aug 22, 2025
f0700da
- Proposed session checking logic with context api and hooks.
mroki58 Aug 24, 2025
5311ebf
- Proposed Tokenization project github workflow for UI tests ( eslint…
mroki58 Aug 25, 2025
494c626
Fixing components and changing routes for better using of react-route…
mroki58 Sep 3, 2025
5232c19
Double import fix
mroki58 Sep 3, 2025
ef7ecfb
Test commit for checking pushing with cuurent tokenization.yml
mroki58 Sep 3, 2025
7ae3345
npm ci => npm i because of some errors in lock file
mroki58 Sep 3, 2025
b75be95
- dependencies for building application taken from dev to normal depe…
mroki58 Sep 3, 2025
8fe9693
Actions for lint-checking in backend (waiting for guys for their chan…
mroki58 Sep 3, 2025
c2f5922
Merge branch 'feature/TKN/OGUI-1724/prepare-testing-env' into feature…
mroki58 Sep 3, 2025
05f7465
Typo correct
mroki58 Sep 3, 2025
7505c32
Updating .dockerignore
mroki58 Sep 3, 2025
d473dcf
Adjust test file
mroki58 Sep 3, 2025
4de90cd
Merge branch 'feature/TKN/OGUI-1725/session-checking' into feature/TK…
mroki58 Sep 3, 2025
a2a4648
Fixed type error in sidebar.tsx - changed wrong Props type
mroki58 Sep 19, 2025
2d69a8d
Part of token creation workflow working - selects for services and HT…
mroki58 Oct 1, 2025
7376100
Changes in create.tsx for http methods
mroki58 Oct 2, 2025
71129cc
Token panel updated with overwiew and token details pages updated. Re…
mroki58 Oct 3, 2025
15bf271
Adjusted eslint configuration file for linting and fixing mocha tests…
mroki58 Oct 7, 2025
e7cfafa
Merge branch 'dev' into feature/TKN/OGUI-1724/prepare-testing-env
mroki58 Oct 7, 2025
948a4a0
Merge branch 'feature/TKN/OGUI-1724/prepare-testing-env' into feature…
mroki58 Oct 7, 2025
0114076
Added ui-tests for creating tokens
mroki58 Oct 7, 2025
17480d5
Use of promise.all in beforeEach test and adding jsdocs
mroki58 Oct 10, 2025
2b36cbf
package-lock fix
mroki58 Oct 10, 2025
68c0c6e
Layout reorganisation
mroki58 Nov 7, 2025
0c55740
Merge branch 'feature/TKN/OGUI-1712/token-panel-create' into feature/…
mroki58 Nov 7, 2025
7e5f624
Modal with TokenTable updated - styles for Modal proposed (to change)…
mroki58 Nov 13, 2025
9868edb
Merge remote-tracking branch 'origin/feature/TKN/OGUI-1713/token-crea…
mroki58 Nov 13, 2025
f903496
form & single-select proposition
mroki58 Nov 13, 2025
cea8809
select using aria
mroki58 Nov 13, 2025
f1f04e2
Merge remote-tracking branch 'origin/dev' into feature/TKN/OGUI-1805/…
mroki58 Nov 13, 2025
a256e5c
MultiSelect logic created
mroki58 Nov 13, 2025
2a85fbf
React-select logic and linting for whole pr
mroki58 Nov 15, 2025
87a4785
Solving typescript type errors for handleSelect functions by templates
mroki58 Nov 15, 2025
d011b9d
Window template and lgic implemented in hook, types transferred to .d…
mroki58 Nov 15, 2025
6b0e0c1
Grouping selects so they don't have already used value as option. PR…
mroki58 Nov 17, 2025
c227714
Some things in create.tsx needs to be done
mroki58 Nov 17, 2025
1c064e1
Created Box1_1 making modal window wider. create.tsx now have similar…
mroki58 Nov 18, 2025
aed683b
eslint changes no docs
mroki58 Nov 21, 2025
f379bc7
typescript casting added to prevent error
mroki58 Nov 21, 2025
d2c7fb9
typescript errors in lists fixed
mroki58 Nov 21, 2025
fd632e9
Documentation added
mroki58 Nov 24, 2025
0ac6bfe
deleted materialUI dialog and alert components
mroki58 Nov 24, 2025
8f2ef4d
Tests for token creation form are now suited for new layout components
mroki58 Nov 24, 2025
28e3c11
Tests for token deleting and creating created for current UI
mroki58 Nov 24, 2025
7c3798b
linting and delete of unused variables
mroki58 Nov 24, 2025
6c28e1f
For better timeout Alert now is added to DOM conditionally over using…
mroki58 Nov 25, 2025
1398a2d
refactor for token-form to use context api and for form component to …
mroki58 Nov 25, 2025
bf63d2e
Concept of how filtering could look for Token Table
mroki58 Nov 25, 2025
f326991
Added few more filters. Solved problem with button with unnecesary po…
mroki58 Nov 26, 2025
b35948c
Documentation and dependency lists updated - functions in context wra…
mroki58 Nov 26, 2025
cc5c654
Merge branch 'feature/TKN/OGUI-1805/layout' into feature/TKN/OGUI-182…
mroki58 Nov 26, 2025
a789807
Delete unnecessary alert-list file
mroki58 Nov 26, 2025
767cdbd
Adjusted session import from requested PR
mroki58 Dec 4, 2025
dd110ed
Merge branch 'feature/TKN/OGUI-1805/layout' into feature/TKN/OGUI-182…
mroki58 Dec 4, 2025
5d98b63
Refactoring TokenFilters code - created FlexGrowWrapper and FlexGrowW…
mroki58 Dec 4, 2025
b44a6ef
Applying and clearing filters
mroki58 Dec 4, 2025
0bc7b27
style: eslint-related changes
mroki58 Dec 4, 2025
1dc50c6
Multi Select specifically for Ordering created which excludes opposit…
mroki58 Dec 5, 2025
0a6b567
Change to satisfy eslint rule where commands must start with uppercase
mroki58 Dec 7, 2025
584461c
Selects and inputs are now adjusted to use fetcher.Form component fro…
mroki58 Dec 7, 2025
ea0f1a9
Merge branch 'feature/TKN/OGUI-1805/layout' into feature/TKN/OGUI-182…
mroki58 Dec 7, 2025
ec55e46
FormInputs change to accept properly other types
mroki58 Dec 8, 2025
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
58 changes: 58 additions & 0 deletions Tokenization/webapp/app/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,73 @@
* or submit itself to any jurisdiction.
*/

:root {
--color-transparent: rgba(0,0,0,0)
}

.wrap {
flex-wrap: wrap;
}

.bg-transparent {
background-color: var(--color-transparent);
}

.justify-end {
justify-content: flex-end;
}

.self-center {
align-self: center;
}

.ml1 { margin-left: var(--space-xs); }
.ml2 { margin-left: var(--space-s); }
.ml3 { margin-left: var(--space-m); }
.ml4 { margin-left: var(--space-l); }
.ml5 { margin-left: var(--space-xl)}
.mb2 { margin-bottom: var(--space-s)}


.no-border {
border: 0;
}

.bra2 {
border: 2px solid black;
}

.brb2 {
border-bottom: 2px solid black;
}

.scale12 {
transform: scale(1.2);
}

.scale15 {
transform: scale(1.5);
}

.scale25 {
transform: scale(2.5);
}

.menu-item-static {
/* This class is the same as menu-item from aliceo2 css framework but can be used wihouth hover and active actions*/
text-decoration: none;
height: 2em;
line-height: 2em;
padding-left: 1em;
padding-right: 1em;
color: var(--color-gray-darker);
font-weight: 100;
margin: 0.25em;
border-radius: 0.25em;
display: block;
user-select: none;
}

.static {
position: static;
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
104 changes: 104 additions & 0 deletions Tokenization/webapp/app/components/box.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
/**
* @license
* Copyright 2019-2020 CERN and copyright holders of ALICE O2.
* See http://alice-o2.web.cern.ch/copyright for details of the copyright holders.
* All rights not expressly granted are reserved.
*
* This software is distributed under the terms of the GNU General Public
* License v3 (GPL Version 3), copied verbatim in the file "COPYING".
*
* In applying this license CERN does not waive the privileges and immunities
* granted to it by virtue of its status as an Intergovernmental Organization
* or submit itself to any jurisdiction.
*/

import React from 'react';
import { Link } from 'react-router';
import { IconContainer, IconExpandRight } from '~/ui/icon';

interface BoxInterface {
children: React.ReactNode;
link: string | null;
}

interface PrimaryBoxInterface extends BoxInterface {
className_div1: string;
className_div2: string;
}
/**
* Box component - container which renders a content inside.
*
* TODO: On PC it will stand in grid layout on mobile will lay basing on display flex with wrap
* For now it uses grid only.
*
* @param {object} props - Component props.
* @param {React.ReactNode} props.children - Content rendered inside the box.
* @param {string|null} props.link - Passing this prop to the component enables rendering of the top bar
* with an icon that navigates the user to the corresponding details page.
* @param {string} props.className_div1 - Additional classes applied to the outer container.
* @param {string} props.className_div2 - Additional classes applied to the top link row container.
*/
export function Box({ children, link, className_div1, className_div2 }: PrimaryBoxInterface) {
return (
<div className={`bg-gray m3 ${className_div1}`}>
{link && <div className={`flex-row justify-center ${className_div2}`}>
<div className="w-90 flex-row justify-end">
<Link to={link}>
<IconContainer className="scale15 actionable-icon">
<IconExpandRight />
</IconContainer>
</Link>
</div>
</div>
}
{children}
</div>
);
}

/**
* Box 1_2 component - renders box with padding suited for grid with 1 row and 2 columns.
*
* @param {object} props - Component props.
* @param {React.ReactNode} props.children - Content rendered inside the box.
* @param {string|null} props.link - Passing this prop to the component enables rendering of the top bar
* with an icon that navigates the user to the corresponding details page.
*/
export function Box1_2 ({ children, link }: BoxInterface) {
return (
<Box
link={link}
className_div1="min-height-box-1"
className_div2="mv3"
>
<div className="flex-row justify-center">
<div className="w-95">
{children}
</div>
</div>
</Box>
);
}

/**
* Box 1_2 component - renders box with padding suited for grid with 1 row and 1 column.
*
* @param {object} props - Component props.
* @param {React.ReactNode} props.children - Content rendered inside the box.
* @param {string|null} props.link - Passing this prop to the component enables rendering of the top bar
* with an icon that navigates the user to the corresponding details page.
*/
export function Box1_1 ({ children, link }: BoxInterface) {
return (
<Box
link={link}
className_div1="min-height-box-1"
className_div2="mv4"
>
<div className='p4'>
<div className='mv2'></div>
{children}
</div>
</Box>
);
}
86 changes: 86 additions & 0 deletions Tokenization/webapp/app/components/form/form-buttons.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
/**
* @license
* Copyright 2019-2020 CERN and copyright holders of ALICE O2.
* See http://alice-o2.web.cern.ch/copyright for details of the copyright holders.
* All rights not expressly granted are reserved.
*
* This software is distributed under the terms of the GNU General Public
* License v3 (GPL Version 3), copied verbatim in the file "COPYING".
*
* In applying this license CERN does not waive the privileges and immunities
* granted to it by virtue of its status as an Intergovernmental Organization
* or submit itself to any jurisdiction.
*/

import type { ButtonInterface } from '../window/window';

/**
* Generic form button wrapper.
*
* Renders a <button> element and wraps the provided action callback with
* preventDefault behaviour. The provided `action` will be invoked after
* preventDefault has been called on the click event.
*
* @param {object} props - Component props.
* @param {('button'|'submit'|'reset')} props.type - Button type attribute.
* @param {() => void} [props.action] - Callback to run on click; FormButton calls event.preventDefault() before invoking it.
* @param {string} [props.className] - Additional CSS classes.
* Prefer using this to change button color (e.g. "btn-primary" or "btn-danger"),
* but it can also be used for sizing, spacing or other style tweaks.
* @param {React.ReactNode} [props.children] - Button content.
*/
function FormButton({ type, action, className, children }: ButtonInterface) {

const onClick = (e: React.MouseEvent<HTMLButtonElement>) => {
e.preventDefault();
action?.();
};

return (
<button
type={type}
className={`btn ${className}`}
onClick={onClick}
>
{children}
</button>
);
}

/**
* Submit button with primary styling.
*
* @param {object} props - Component props.
* @param {() => void} [props.action] - Click handler; will be wrapped with preventDefault() behaviour.
* @param {string} [props.className] - Additional classes to modify appearance (recommended for color changes).
*/
export function SubmitButton({ action, className }: ButtonInterface) {
return (
<FormButton
className={`btn-primary ${className}`}
type='submit'
action={action}
>
Submit
</FormButton>
);
}

/**
* Reset button with danger styling.
*
* @param {object} props - Component props.
* @param {() => void} [props.action] - Click handler; will be wrapped with preventDefault() behaviour.
* @param {string} [props.className] - Additional classes to modify appearance (recommended for color changes).
*/
export function ResetButton({ action, className }: ButtonInterface) {
return (
<FormButton
className={`btn-danger ${className}`}
type='button'
action={action}
>
Reset
</FormButton>
);
}
108 changes: 108 additions & 0 deletions Tokenization/webapp/app/components/form/form-input.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
/**
* @license
* Copyright 2019-2020 CERN and copyright holders of ALICE O2.
* See http://alice-o2.web.cern.ch/copyright for details of the copyright holders.
* All rights not expressly granted are reserved.
*
* This software is distributed under the terms of the GNU General Public
* License v3 (GPL Version 3), copied verbatim in the file "COPYING".
*
* In applying this license CERN does not waive the privileges and immunities
* granted to it by virtue of its status as an Intergovernmental Organization
* or submit itself to any jurisdiction.
*/

import React, { type PropsWithChildren } from 'react';
import { type FormInputInterface } from './form.d';

/**
* FormInput
*
* Generic input wrapper that normalizes change handling for string and number values.
*
* @template T - input value type, either string or number (default: string).
* @param {object} props - Component props.
* @param {T} props.value - Current input value.
* @param {(v: T) => void} props.setValue - Setter for the value; called with parsed value on change.
* @param {string} [props.labelText] - Optional label text displayed above the input.
* @param {React.HTMLAttributes<HTMLDivElement>} [props.containerProps] - Props spread onto the outer container element.
* @param {React.LabelHTMLAttributes<HTMLLabelElement>} [props.labelProps] - Props spread onto the label element.
* @param {React.InputHTMLAttributes<HTMLInputElement>} [props.inputProps] - Props spread onto the input element.
*
*/
function FormInput<T extends string | number = string>({
value,
setValue,
labelText,
name,
children,
}: PropsWithChildren<FormInputInterface<T>>) {

// If setValue and value are provided than input is controlled
const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
const { target } = e;
let newVal: T;
if (typeof value === 'number') {
const parsed = parseFloat(target.value);
newVal = (isNaN(parsed) ? 0 : parsed) as T;
} else {
newVal = target.value as T;
}
setValue?.(newVal);
};

const childInput = React.Children.toArray(children)[0];

Check warning on line 54 in Tokenization/webapp/app/components/form/form-input.tsx

View workflow job for this annotation

GitHub Actions / Check eslint rules for webapp on ubuntu-latest

Use array destructuring
const input = React.cloneElement(childInput as React.ReactElement<React.InputHTMLAttributes<HTMLInputElement>>, {
id: name,
value: value as unknown as string,
onChange: handleChange,
});

return (
<div className='my-input'>
{labelText && (
<label htmlFor={name}>
{labelText}
</label>
)}
{input}
</div>
);
}

/**
* FormInputNumber
*
* Number input specialization of FormInput.
*
* @param {object} props - component props
* @param {number} props.value - current numeric value
* @param {(v: number) => void} props.setValue - setter for the numeric value
* @param {string} [props.labelText] - optional label text
* @param {string} props.name - input name attribute
*
* notes:
* - step is set to 1 and min to 0 in the input element
* - if value and setValue are provided than input is controlled
*/
export function FormInputNumber({ value, setValue, labelText, name }: FormInputInterface) {
return <FormInput
value={value}
setValue={setValue}
labelText={labelText}
name={name}
>
<input type='number' name={name} step={1} min={0}/>
</FormInput>;
}

export function FormInputDatetime({ value, setValue, labelText, name }: FormInputInterface<string>) {

Check failure on line 99 in Tokenization/webapp/app/components/form/form-input.tsx

View workflow job for this annotation

GitHub Actions / Check eslint rules for webapp on ubuntu-latest

Missing JSDoc comment
return <FormInput
value={value}
setValue={setValue}
labelText={labelText}
name={name}
>
<input type='datetime-local' name={name} />
</FormInput>;
}

Check failure on line 108 in Tokenization/webapp/app/components/form/form-input.tsx

View workflow job for this annotation

GitHub Actions / Check eslint rules for webapp on ubuntu-latest

Newline required at end of file but not found
Loading
Loading