Compare commits

...

4 Commits

Author SHA1 Message Date
Maksim Eltyshev
96956e1268 chore: Update version 2024-11-18 00:00:32 +01:00
Maksim Eltyshev
5a3c3bb39b fix: Disable pointer events when dragging 2024-11-17 23:45:29 +01:00
Maksim Eltyshev
1a70b2b7e6 fix: Prevent list with multiline title from overflowing board view
Closes #377
2024-11-17 23:37:43 +01:00
Maksim Eltyshev
71d0815891 fix: Consider language specifics when parsing time
Closes #946
2024-11-16 18:13:13 +01:00
12 changed files with 47 additions and 25 deletions

View File

@@ -15,13 +15,13 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.2.15
version: 0.2.16
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.24.0"
appVersion: "1.24.1"
dependencies:
- alias: postgresql

View File

@@ -11,6 +11,7 @@ import ListAdd from './ListAdd';
import { ReactComponent as PlusMathIcon } from '../../assets/images/plus-math-icon.svg';
import styles from './Board.module.scss';
import globalStyles from '../../styles.module.scss';
const parseDndId = (dndId) => dndId.split(':')[1];
@@ -31,11 +32,14 @@ const Board = React.memo(
}, []);
const handleDragStart = useCallback(() => {
document.body.classList.add(globalStyles.dragging);
closePopup();
}, []);
const handleDragEnd = useCallback(
({ draggableId, type, source, destination }) => {
document.body.classList.remove(globalStyles.dragging);
if (
!destination ||
(source.droppableId === destination.droppableId && source.index === destination.index)

View File

@@ -13,6 +13,7 @@ import AddStep from './AddStep';
import EditStep from './EditStep';
import styles from './Boards.module.scss';
import globalStyles from '../../styles.module.scss';
const Boards = React.memo(({ items, currentId, canEdit, onCreate, onUpdate, onMove, onDelete }) => {
const tabsWrapper = useRef(null);
@@ -24,11 +25,14 @@ const Boards = React.memo(({ items, currentId, canEdit, onCreate, onUpdate, onMo
}, []);
const handleDragStart = useCallback(() => {
document.body.classList.add(globalStyles.dragging);
closePopup();
}, []);
const handleDragEnd = useCallback(
({ draggableId, source, destination }) => {
document.body.classList.remove(globalStyles.dragging);
if (!destination || source.index === destination.index) {
return;
}

View File

@@ -10,16 +10,20 @@ import Item from './Item';
import Add from './Add';
import styles from './Tasks.module.scss';
import globalStyles from '../../../styles.module.scss';
const Tasks = React.memo(({ items, canEdit, onCreate, onUpdate, onMove, onDelete }) => {
const [t] = useTranslation();
const handleDragStart = useCallback(() => {
document.body.classList.add(globalStyles.dragging);
closePopup();
}, []);
const handleDragEnd = useCallback(
({ draggableId, source, destination }) => {
document.body.classList.remove(globalStyles.dragging);
if (!destination || source.index === destination.index) {
return;
}

View File

@@ -67,11 +67,18 @@ const DueDateEditStep = React.memo(({ defaultValue, onUpdate, onBack, onClose })
return;
}
const value = parseTime(data.time, nullableDate);
let value = t('format:dateTime', {
postProcess: 'parseDate',
value: `${data.date} ${data.time}`,
});
if (Number.isNaN(value.getTime())) {
timeField.current.select();
return;
value = parseTime(data.time, nullableDate);
if (Number.isNaN(value.getTime())) {
timeField.current.select();
return;
}
}
if (!defaultValue || value.getTime() !== defaultValue.getTime()) {
@@ -79,7 +86,7 @@ const DueDateEditStep = React.memo(({ defaultValue, onUpdate, onBack, onClose })
}
onClose();
}, [defaultValue, onUpdate, onClose, data, nullableDate]);
}, [defaultValue, onUpdate, onClose, data, nullableDate, t]);
const handleClearClick = useCallback(() => {
if (defaultValue) {

View File

@@ -13,6 +13,7 @@ import EditStep from './EditStep';
import Item from './Item';
import styles from './LabelsStep.module.scss';
import globalStyles from '../../styles.module.scss';
const StepTypes = {
ADD: 'ADD',
@@ -77,8 +78,14 @@ const LabelsStep = React.memo(
[onDeselect],
);
const handleDragStart = useCallback(() => {
document.body.classList.add(globalStyles.dragging);
}, []);
const handleDragEnd = useCallback(
({ draggableId, source, destination }) => {
document.body.classList.remove(globalStyles.dragging);
if (!destination || source.index === destination.index) {
return;
}
@@ -159,7 +166,7 @@ const LabelsStep = React.memo(
onChange={handleSearchChange}
/>
{filteredItems.length > 0 && (
<DragDropContext onDragEnd={handleDragEnd}>
<DragDropContext onDragStart={handleDragStart} onDragEnd={handleDragEnd}>
<Droppable droppableId="labels" type={DroppableTypes.LABEL}>
{({ innerRef, droppableProps, placeholder }) => (
<div

View File

@@ -32,7 +32,7 @@ const List = React.memo(
const [isAddCardOpened, setIsAddCardOpened] = useState(false);
const nameEdit = useRef(null);
const listWrapper = useRef(null);
const cardsWrapper = useRef(null);
const handleHeaderClick = useCallback(() => {
if (isPersisted && canEdit) {
@@ -67,7 +67,7 @@ const List = React.memo(
useEffect(() => {
if (isAddCardOpened) {
listWrapper.current.scrollTop = listWrapper.current.scrollHeight;
cardsWrapper.current.scrollTop = cardsWrapper.current.scrollHeight;
}
}, [cardIds, isAddCardOpened]);
@@ -133,13 +133,7 @@ const List = React.memo(
</ActionsPopup>
)}
</div>
<div
ref={listWrapper}
className={classNames(
styles.cardsInnerWrapper,
(isAddCardOpened || !canEdit) && styles.cardsInnerWrapperFull,
)}
>
<div ref={cardsWrapper} className={styles.cardsInnerWrapper}>
<div className={styles.cardsOuterWrapper}>{cardsNode}</div>
</div>
{!isAddCardOpened && canEdit && (

View File

@@ -40,7 +40,6 @@
}
.cardsInnerWrapper {
max-height: calc(100vh - 268px);
overflow-x: hidden;
overflow-y: auto;
width: 290px;
@@ -62,10 +61,6 @@
}
}
.cardsInnerWrapperFull {
max-height: calc(100vh - 232px);
}
.cardsOuterWrapper {
padding: 0 8px;
white-space: normal;
@@ -140,6 +135,9 @@
.outerWrapper {
background: #dfe3e6;
border-radius: 3px;
display: flex;
flex-direction: column;
max-height: calc(100vh - 198px);
overflow: hidden;
}
}

View File

@@ -142,6 +142,10 @@
}
:global(#app) {
&.dragging>* {
pointer-events: none;
}
/* Backgrounds */
.backgroundBerryRed {

View File

@@ -1 +1 @@
export default '1.24.0';
export default '1.24.1';

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "planka",
"version": "1.24.0",
"version": "1.24.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "planka",
"version": "1.24.0",
"version": "1.24.1",
"hasInstallScript": true,
"license": "AGPL-3.0",
"dependencies": {

View File

@@ -1,6 +1,6 @@
{
"name": "planka",
"version": "1.24.0",
"version": "1.24.1",
"private": true,
"homepage": "https://plankanban.github.io/planka",
"repository": {