Skip to content
This repository has been archived by the owner on May 2, 2024. It is now read-only.

Commit

Permalink
Merge branch 'main' into h2-update
Browse files Browse the repository at this point in the history
  • Loading branch information
Trishadring authored Feb 8, 2024
2 parents 544868d + 063d9e2 commit 802e2a0
Show file tree
Hide file tree
Showing 87 changed files with 150 additions and 140 deletions.
6 changes: 3 additions & 3 deletions api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ dependencies {
implementation 'org.apache.commons:commons-csv:1.8'
implementation 'org.apache.commons:commons-lang3:3.12.0'
implementation 'org.apache.httpcomponents:httpclient:4.5.13'
implementation 'org.liquibase:liquibase-core:4.3.5'
implementation 'org.springdoc:springdoc-openapi-ui:1.5.9'
implementation 'org.liquibase:liquibase-core:4.8.0'
implementation 'org.springdoc:springdoc-openapi-ui:1.7.0'

// https://mvnrepository.com/artifact/com.google.code.findbugs/jsr305
compileOnly 'com.google.code.findbugs:jsr305:3.0.2'
Expand All @@ -82,7 +82,7 @@ dependencies {

developmentOnly 'org.springframework.boot:spring-boot-devtools'

runtimeOnly 'org.postgresql:postgresql:42.4.0'
runtimeOnly 'org.postgresql:postgresql:42.4.3'
}

static def noProfileOrDbDefined(tasks) {
Expand Down
12 changes: 6 additions & 6 deletions ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

50 changes: 21 additions & 29 deletions ui/src/App/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function App() {
const theme = useRecoilValue(ThemeState);

const environmentConfig = useEnvironmentConfig();
const { email_is_enabled = true } = environmentConfig || {};
const { email_is_enabled = true } = environmentConfig ?? {};

useEffect(() => {
document.body.className = getThemeClassFromUserSettings();
Expand All @@ -78,34 +78,26 @@ function App() {
<Route path="radiator" element={<RadiatorPage />} />
</Route>
{email_is_enabled && (
<Route path="/email/reset" element={<ChangeTeamDetailsPage />} />
)}
{email_is_enabled && (
<Route path="/password/reset" element={<ResetPasswordPage />} />
)}
{email_is_enabled && (
<Route
path={EXPIRED_PASSWORD_RESET_LINK_PATH}
element={<ExpiredResetPasswordLinkPage />}
/>
)}
{email_is_enabled && (
<Route
path={EXPIRED_EMAIL_RESET_LINK_PATH}
element={<ExpiredResetBoardOwnersLinkPage />}
/>
)}
{email_is_enabled && (
<Route
path={PASSWORD_RESET_REQUEST_PATH}
element={<PasswordResetRequestPage />}
/>
)}
{email_is_enabled && (
<Route
path={RECOVER_TEAM_NAME_PATH}
element={<RecoverTeamNamePage />}
/>
<>
<Route path="/email/reset" element={<ChangeTeamDetailsPage />} />
<Route path="/password/reset" element={<ResetPasswordPage />} />
<Route
path={EXPIRED_PASSWORD_RESET_LINK_PATH}
element={<ExpiredResetPasswordLinkPage />}
/>
<Route
path={EXPIRED_EMAIL_RESET_LINK_PATH}
element={<ExpiredResetBoardOwnersLinkPage />}
/>
<Route
path={PASSWORD_RESET_REQUEST_PATH}
element={<PasswordResetRequestPage />}
/>
<Route
path={RECOVER_TEAM_NAME_PATH}
element={<RecoverTeamNamePage />}
/>
</>
)}
<Route path="*" element={<PageNotFoundPage />} />
</Routes>
Expand Down
4 changes: 2 additions & 2 deletions ui/src/App/ChangeTeamDetails/ChangeTeamDetailsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ interface ValueAndValidity {
validity: boolean;
}

function ChangeTeamDetailsPage(): JSX.Element {
function ChangeTeamDetailsPage(): React.ReactElement {
const { search } = useLocation();
const navigate = useNavigate();
const emailResetToken = new URLSearchParams(search).get('token') || 'invalid';
const emailResetToken = new URLSearchParams(search).get('token') ?? 'invalid';

const [email, setEmail] = useState<ValueAndValidity>(blankValueWithValidity);
const [secondaryEmail, setSecondaryEmail] = useState<ValueAndValidity>({
Expand Down
2 changes: 1 addition & 1 deletion ui/src/App/CreateTeam/CreateTeamPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ interface ValueAndValidity {
validity: boolean;
}

function CreateTeamPage(): JSX.Element {
function CreateTeamPage(): React.ReactElement {
const { login } = useAuth();

const [teamName, setTeamName] = useState<ValueAndValidity>(
Expand Down
2 changes: 1 addition & 1 deletion ui/src/App/Login/LoginPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import { EnvironmentConfigState } from 'State/EnvironmentConfigState';

import './LoginPage.scss';

function LoginPage(): JSX.Element {
function LoginPage(): React.ReactElement {
const { teamId = '' } = useParams();

const { login } = useAuth();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import LinkTertiary from 'Common/LinkTertiary/LinkTertiary';
import useEnvironmentConfig from 'Hooks/useEnvironmentConfig';
import EmailService from 'Services/Api/EmailService';

function PasswordResetRequestPage(): JSX.Element {
function PasswordResetRequestPage(): React.ReactElement {
const [emailSent, setEmailSent] = useState<boolean>(false);
const [errorMessages, setErrorMessages] = useState<string[]>([]);

Expand Down
4 changes: 2 additions & 2 deletions ui/src/App/ResetPassword/ResetPasswordPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ import {

import './ResetPasswordPage.scss';

function ResetPasswordPage(): JSX.Element {
function ResetPasswordPage(): React.ReactElement {
const { search } = useLocation();
const navigate = useNavigate();
const passwordResetToken =
new URLSearchParams(search).get('token') || 'invalid';
new URLSearchParams(search).get('token') ?? 'invalid';

const [newPassword, setNewPassword] = useState<string>('');
const [isFormSubmitted, setIsFormSubmitted] = useState(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ interface Props {
onActionItemDeletion(): void;
}

function DeleteMultipleActionItemsConfirmation(props: Props) {
function DeleteMultipleActionItemsConfirmation(props: Readonly<Props>) {
const { actionItemIds, onActionItemDeletion } = props;

const team = useRecoilValue(TeamState);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ interface Props {
onActionItemDeletion(): void;
}

function DeleteSingleActionItemConfirmation(props: Props) {
function DeleteSingleActionItemConfirmation(props: Readonly<Props>) {
const { actionItemId, onActionItemDeletion } = props;

const team = useRecoilValue(TeamState);
Expand Down
2 changes: 1 addition & 1 deletion ui/src/App/Team/Archives/ArchivesPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { Outlet } from 'react-router-dom';

import ArchivesSubheader from './ArchivesSubheader/ArchivesSubheader';

function ArchivesPage(): JSX.Element {
function ArchivesPage(): React.ReactElement {
return (
<div className="archives-page">
<ArchivesSubheader />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { NavLink } from 'react-router-dom';

import './ArchivesSubheader.scss';

function ArchivesSubheader(): JSX.Element {
function ArchivesSubheader(): React.ReactElement {
return (
<div className="archives-subheader">
<ul className="archives-subheader-links">
Expand Down
2 changes: 1 addition & 1 deletion ui/src/App/Team/Archives/Pagination/Pagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ interface Props {
onPageChange(pageIndex: number): void;
}

function Pagination(props: Props) {
function Pagination(props: Readonly<Props>) {
const { pageCount, onPageChange } = props;

return pageCount > 1 ? (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import ArchivedBoardColumn from './ArchivedBoardColumn/ArchivedBoardColumn';

import './ArchivedBoard.scss';

function ArchivedBoard(): JSX.Element {
function ArchivedBoard(): React.ReactElement {
const { boardId } = useParams();

const team = useRecoilValue(TeamState);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ interface ThoughtProps {
thought: Thought;
}

function ArchivedBoardThought({ thought }: ThoughtProps): JSX.Element {
function ArchivedBoardThought({
thought,
}: Readonly<ThoughtProps>): React.ReactElement {
return (
<li data-testid={'thought' + thought.id} className="archived-thought">
<p className="message">{thought.message}</p>
Expand All @@ -48,7 +50,10 @@ function ArchivedBoardThought({ thought }: ThoughtProps): JSX.Element {
);
}

function ArchivedBoardColumn({ column, thoughts }: ColumnProps): JSX.Element {
function ArchivedBoardColumn({
column,
thoughts,
}: Readonly<ColumnProps>): React.ReactElement {
return (
<div data-testid="archived-column" className="archived-column">
<ColumnHeader initialTitle={column.title} type={column.topic} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ interface Props {
isSelected: boolean;
}

function ArchivedBoardTile(props: Props): JSX.Element {
function ArchivedBoardTile(props: Readonly<Props>): React.ReactElement {
const { board, onBoardDeletion, onBoardCheckboxClick, isSelected } = props;

const setModalContents = useSetRecoilState(ModalContentsState);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import './ArchivedBoardsList.scss';

const PAGE_SIZE = 20;

function ArchivedBoardsList(): JSX.Element {
function ArchivedBoardsList(): React.ReactElement {
const [boards, setBoards] = useState<Board[]>([]);
const [paginationData, setPaginationData] = useState<PaginationData>();
const team = useRecoilValue(TeamState);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ interface Props {
areAllSelected?: boolean;
}

function ArchivedBoardListHeader(props: Props) {
function ArchivedBoardListHeader(props: Readonly<Props>) {
const { onDateClick, onSelectAllClick, areAllSelected = false } = props;

const [sortOrder, setSortOrder] = useState<SortOrder>(SortOrder.DESC);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ interface Props {
onBoardDeletion(): void;
}

function DeleteBoardConfirmation(props: Props) {
function DeleteBoardConfirmation(props: Readonly<Props>) {
const { boardId, onBoardDeletion } = props;

const team = useRecoilValue(TeamState);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ interface Props {
onBoardDeletion(): void;
}

function DeleteBoardsConfirmation(props: Props) {
function DeleteBoardsConfirmation(props: Readonly<Props>) {
const { boardIds, onBoardDeletion } = props;

const team = useRecoilValue(TeamState);
Expand Down
6 changes: 3 additions & 3 deletions ui/src/App/Team/Radiator/RadiatorPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import { TeamState } from '../../../State/TeamState';

import './RadiatorPage.scss';

function RadiatorPage(): JSX.Element {
function RadiatorPage(): React.ReactElement {
const team = useRecoilValue(TeamState);
const setActionItems = useSetRecoilState(ActionItemState);
const activeActionItems = useRecoilValue(ActiveActionItemsState);
Expand Down Expand Up @@ -57,9 +57,9 @@ function RadiatorPage(): JSX.Element {
Take a look at all your team's active action items
</p>
<ul className="radiator-page-action-items">
{activeActionItems.map((actionItem, index) => {
{activeActionItems.map((actionItem) => {
return (
<li key={`radiator-action-item-${index}`}>
<li key={`radiator-action-item-${actionItem.id}`}>
<ActionItemDisplayOnly actionItem={actionItem} />
</li>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ interface Props {
actionItemId: number;
}

function ActionItem(props: Props) {
function ActionItem(props: Readonly<Props>) {
const { actionItemId } = props;

const actionItem = useRecoilValue(ActionItemByIdState(actionItemId));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ interface Props {
setActionItemMinHeight: (height: number | undefined) => void;
}

function DefaultActionItemView(props: Props) {
function DefaultActionItemView(props: Readonly<Props>) {
const { actionItem, setViewState, setActionItemMinHeight } = props;

const team = useRecoilValue(TeamState);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ interface Props {
height: number | undefined;
}

function DeleteActionItemView(props: Props) {
function DeleteActionItemView(props: Readonly<Props>) {
const { actionItemId, setViewState, height } = props;

const setModalContents = useSetRecoilState(ModalContentsState);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ interface Props {
setViewState: (viewState: ActionItemViewState) => void;
}

function EditActionItemView(props: Props) {
function EditActionItemView(props: Readonly<Props>) {
const { actionItem, setViewState } = props;

const team = useRecoilValue(TeamState);
Expand Down
4 changes: 2 additions & 2 deletions ui/src/App/Team/Retro/ActionItemsColumn/ActionItemsColumn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ function ActionItemsColumn() {
);

const createActionItem = (task: string) => {
if (task && task.length) {
if (task?.length) {
const assigneesArray: string[] | null =
ActionItemService.parseAssignees(task);
const updatedTask: string = ActionItemService.removeAssigneesFromTask(
task,
assigneesArray
);

if (updatedTask && updatedTask.length) {
if (updatedTask?.length) {
const maxAssigneeLength = 50;
const assignees = assigneesArray
? assigneesArray.join(', ').substring(0, maxAssigneeLength)
Expand Down
2 changes: 1 addition & 1 deletion ui/src/App/Team/Retro/MobileColumnNav/MobileColumnNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ interface Props {
setSelectedIndex(index: number): void;
}

function MobileColumnNav(props: Props): JSX.Element {
function MobileColumnNav(props: Readonly<Props>): React.ReactElement {
const { columns = [], selectedIndex, setSelectedIndex } = props;

const isSelectedIndex = (index: number): boolean => index === selectedIndex;
Expand Down
2 changes: 1 addition & 1 deletion ui/src/App/Team/Retro/RetroPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ function RetroPage(): ReactElement {
{columns.map((column, index) => {
return (
<div
key={`column-${index}`}
key={`column-${column.id}`}
className={classNames('column-container', {
selected: index === selectedMobileColumnIndex,
})}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type FeedbackStarsProps = {
onChange: (stars: number) => void;
};

function FeedbackStars(props: FeedbackStarsProps) {
function FeedbackStars(props: Readonly<FeedbackStarsProps>) {
const { value, onChange } = props;
const [hoveredStarValue, setHoveredStarValue] = useState<number>(-1);

Expand Down
2 changes: 1 addition & 1 deletion ui/src/App/Team/Retro/RetroSubheader/RetroSubheader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import FeedbackForm from './FeedbackForm/FeedbackForm';

import './RetroSubheader.scss';

function RetroSubheader(): JSX.Element {
function RetroSubheader(): React.ReactElement {
const { logout } = useAuth();

const setModalContents = useSetRecoilState(ModalContentsState);
Expand Down
Loading

0 comments on commit 802e2a0

Please sign in to comment.