Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set max notes length to 1024 #10720

Merged
merged 1 commit into from
Sep 6, 2024
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
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
Loading