Skip to content

Commit

Permalink
Set max notes length to 1024
Browse files Browse the repository at this point in the history
Fixes #10636
  • Loading branch information
bhollis committed Sep 6, 2024
1 parent 2c14c3f commit 6ded033
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* Added `is:dupeperks` search that shows items that either are a duplicate of another item's perks, or a subset of another item's perks (taking into account which column perks appear in).
* Added a Loadouts CSV export, accessible from the Settings page.
* Improved how conditional stats for perks are calculated, including fixups for exotic catalyst stats, Enhanced Bipod, and more.
* The notes text area now has a maximum editable size of 1024 characters, up from 120.

## 8.35.1 <span class="changelog-date">(2024-09-01)</span>

Expand Down
3 changes: 2 additions & 1 deletion src/app/inventory/spreadsheets.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { CustomStatDef, DestinyVersion } from '@destinyitemmanager/dim-api-types';
import { currentAccountSelector } from 'app/accounts/selectors';
import { customStatsSelector, languageSelector } from 'app/dim-api/selectors';
import { maxLength } from 'app/item-popup/NotesArea';
import { LoadoutsByItem, loadoutsByItemSelector } from 'app/loadout/selectors';
import { buildStatInfo, getColumns } from 'app/organizer/Columns';
import { SpreadsheetContext } from 'app/organizer/table-types';
Expand Down Expand Up @@ -311,7 +312,7 @@ export function importTagsNotesFromCsv(files: File[]): ThunkResult<number | unde
row.Id = row.Id.replace(/"/g, ''); // strip quotes from row.Id
dispatch(
setItemNote({
note: row.Notes,
note: row.Notes.substring(0, maxLength),
itemId: row.Id,
}),
);
Expand Down
2 changes: 1 addition & 1 deletion src/app/item-popup/NotesArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { useSelector } from 'react-redux';
import TextareaAutosize from 'react-textarea-autosize';
import styles from './NotesArea.m.scss';

export const maxLength = 120;
export const maxLength = 1024;

export default function NotesArea({
item,
Expand Down

0 comments on commit 6ded033

Please sign in to comment.