Skip to content

Commit

Permalink
Merge branch 'master' into refactor/use-platform-plugin-components
Browse files Browse the repository at this point in the history
  • Loading branch information
edoardo authored Aug 16, 2024
2 parents 614646b + 985d5b7 commit 0ef7ab9
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 8 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## [100.6.2](https://github.com/dhis2/data-visualizer-app/compare/v100.6.1...v100.6.2) (2024-08-15)


### Bug Fixes

* apply grab cursor to assigned categories dimension item ([#3140](https://github.com/dhis2/data-visualizer-app/issues/3140)) ([437b8f1](https://github.com/dhis2/data-visualizer-app/commit/437b8f10b83c6643db6cee7caedb8774af9ae0f4))

## [100.6.1](https://github.com/dhis2/data-visualizer-app/compare/v100.6.0...v100.6.1) (2024-08-13)


Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "data-visualizer-app",
"version": "100.6.1",
"version": "100.6.2",
"description": "DHIS2 Data Visualizer",
"license": "BSD-3-Clause",
"private": true,
Expand Down
17 changes: 11 additions & 6 deletions src/components/DimensionsPanel/DndDimensionItem.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { DimensionItem } from '@dhis2/analytics'
import {
DimensionItem,
DIMENSION_ID_ASSIGNED_CATEGORIES,
} from '@dhis2/analytics'
import cx from 'classnames'
import PropTypes from 'prop-types'
import React, { Component } from 'react'
import { Draggable } from 'react-beautiful-dnd'
Expand Down Expand Up @@ -41,11 +45,12 @@ export class DndDimensionItem extends Component {
innerRef={provided.innerRef}
{...provided.draggableProps}
{...provided.dragHandleProps}
className={
snapshot.isDragging
? styles.dragging
: styles.notDragging
}
className={cx({
[styles.dragging]: snapshot.isDragging,
[styles.notDragging]: !snapshot.isDragging,
[styles.assignedCategories]:
id === DIMENSION_ID_ASSIGNED_CATEGORIES,
})}
onClick={onClick}
onOptionsClick={onOptionsClick}
{...itemCommonProps}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
This keeps the dimension item clone from causing
This keeps the dimension item clone from causing
a ripple effect in the Dimension list during drag
*/

Expand All @@ -11,3 +11,9 @@ a ripple effect in the Dimension list during drag
background-color: #e8edf2;
border-radius: 2px;
}
:global(.item).assignedCategories {
cursor: grab;
}
:global(.item.selected).assignedCategories {
cursor: default;
}
2 changes: 2 additions & 0 deletions src/components/Layout/Chip.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ const Chip = ({
dimensionId,
DIMENSION_PROP_NO_ITEMS
) && !items.length,
[styles.assignedCategories]:
dimensionId === DIMENSION_ID_ASSIGNED_CATEGORIES,
})}
data-dimensionid={dimensionId}
draggable={!isLocked}
Expand Down
4 changes: 4 additions & 0 deletions src/components/Layout/styles/Chip.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.chip.assignedCategories {
cursor: grab;
}

.chipEmpty {
background-color: var(--colors-grey100);
border-color: var(--colors-grey400);
Expand Down

0 comments on commit 0ef7ab9

Please sign in to comment.