Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [5.0.6-0](https://github.com/starwit/react-image-annotate/compare/5.0.5...5.0.6-0) (2024-03-27)

### [5.0.5](https://github.com/starwit/react-image-annotate/compare/5.0.4...5.0.5) (2024-03-21)

### [5.0.4](https://github.com/starwit/react-image-annotate/compare/5.0.2-1...5.0.4) (2024-03-20)
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@starwit/react-image-annotate",
"version": "5.0.5",
"version": "5.0.6-0",
"private": false,
"type": "module",
"files": [
Expand Down
1 change: 1 addition & 0 deletions src/ClassSelectionMenu/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export const ClassSelectionMenu = ({
subTitle=""
icon={<BallotIcon style={{color: muiColors.grey[700]}} />}
expandedByDefault
noScroll={true}
>
{regionClsList.map((label, index) => (
<LabelContainer
Expand Down
19 changes: 10 additions & 9 deletions src/HistorySidebarBox/index.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @flow

import React, {memo} from "react"
import {createTheme, styled, ThemeProvider} from "@mui/material/styles"
import React, { memo } from "react"
import { createTheme, styled, ThemeProvider } from "@mui/material/styles"
import SidebarBoxContainer from "../SidebarBoxContainer"
import HistoryIcon from "@mui/icons-material/History"
import List from "@mui/material/List"
Expand All @@ -11,9 +11,9 @@ import IconButton from "@mui/material/IconButton"
import ListItemSecondaryAction from "@mui/material/ListItemSecondaryAction"
import UndoIcon from "@mui/icons-material/Undo"
import moment from "moment"
import {grey} from "@mui/material/colors"
import { grey } from "@mui/material/colors"
import isEqual from "lodash/isEqual"
import {useTranslation} from "react-i18next"
import { useTranslation } from "react-i18next"

const theme = createTheme()
const EmptyTextDiv = styled('div')(() => ({
Expand All @@ -24,28 +24,29 @@ const EmptyTextDiv = styled('div')(() => ({
padding: 20,
}))

const listItemTextStyle = {paddingLeft: 16}
const listItemTextStyle = { paddingLeft: 16 }

export const HistorySidebarBox = ({
history,
onRestoreHistory,
}) => {

const {t} = useTranslation();
const { t } = useTranslation();

return (
<ThemeProvider theme={theme}>
<SidebarBoxContainer
title={t("menu.history")}
icon={<HistoryIcon style={{color: grey[700]}} />}
icon={<HistoryIcon style={{ color: grey[700] }} />}
expandedByDefault
noScroll={true}
>
<List>
{history.length === 0 && (
<EmptyTextDiv>{t("no.history")}</EmptyTextDiv>
)}
{history.map(({name, time}, i) => (
<ListItem button dense key={i}>
{history.map(({ name, time }, i) => (
<ListItem button dense key={i} >
<ListItemText
style={listItemTextStyle}
primary={name}
Expand Down
1 change: 1 addition & 0 deletions src/RegionSelectorSidebarBox/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ export const RegionSelectorSidebarBox = ({
subTitle=""
icon={<RegionIcon style={{color: grey[700]}} />}
expandedByDefault
noScroll={true}
>
<ContainerDiv>
<MemoRowHeader />
Expand Down
4 changes: 2 additions & 2 deletions src/SidebarBoxContainer/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ export const SidebarBoxContainer = ({
title,
subTitle,
children,
noScroll = false,
noScroll,
expandedByDefault = false,
}) => {
return (
<ThemeProvider theme={theme}>
<SidebarBox icon={icon} title={title}>
<SidebarBox icon={icon} title={title} noScroll={noScroll}>
{children}
</SidebarBox>
</ThemeProvider>
Expand Down
5 changes: 2 additions & 3 deletions src/workspace/SidebarBox/index.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// @flow

import React, { useState, memo, useCallback } from "react"
import Paper from "@mui/material/Paper"
import { createTheme, styled, ThemeProvider } from "@mui/material/styles"
import ExpandIcon from "@mui/icons-material/ExpandMore"
import IconButton from "@mui/material/IconButton"
Expand Down Expand Up @@ -37,7 +36,7 @@ export const SidebarBox = ({
title,
subTitle,
children,
noScroll = false,
noScroll,
expandedByDefault,
}) => {
const content = (
Expand Down Expand Up @@ -88,7 +87,7 @@ export const SidebarBox = ({
<Collapse in={expanded} >
<div
className="panel"
style={{ display: "block", overflow: "hidden", height: 200 }}
style={{ display: "block", overflow: "hidden", height: 300 }}
>
{content}
</div>
Expand Down
4 changes: 0 additions & 4 deletions src/workspace/SidebarBox/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,5 @@ export default {
expandedContent: {
maxHeight: 300,
overflowY: "auto",
"&.noScroll": {
overflowY: "visible",
overflow: "visible",
},
},
}