Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
f6cd2cf
feat(trees): sort chronostrat by period
grantfitzsimmons Jul 3, 2026
650af31
feat: add ranges to chronostrat
grantfitzsimmons Jul 3, 2026
8e7229b
fix: minor localization improvement
grantfitzsimmons Jul 3, 2026
dd261a5
feat(trees): make the start and end period smaller
grantfitzsimmons Jul 3, 2026
7d0a3c6
fix: add geologic time period labels
grantfitzsimmons Jul 3, 2026
0c5d1b4
fix(trees): hide uncertainty where there is none
grantfitzsimmons Jul 3, 2026
32b81ac
Lint code with ESLint and Prettier
grantfitzsimmons Jul 3, 2026
c996d2f
fix: prevent localization stripping
grantfitzsimmons Jul 3, 2026
874f962
refactor(trees): simplify label construction
grantfitzsimmons Jul 3, 2026
21fe094
fix(tests): add new parameter
grantfitzsimmons Jul 3, 2026
241ad64
Merge branch 'issue-6049' of https://github.com/specify/specify7 into…
grantfitzsimmons Jul 3, 2026
137f7a5
Lint code with ESLint and Prettier
grantfitzsimmons Jul 3, 2026
264c0c4
feat(trees): add biostrat filter to chronostrat
grantfitzsimmons Jul 4, 2026
373a144
feat: remove weird capitalization
grantfitzsimmons Jul 4, 2026
4e5774b
feat(trees): make `biostrat` search only biostrat records
grantfitzsimmons Jul 4, 2026
3d1d576
fix(QueryComboBox): filter BioStrat properly
grantfitzsimmons Jul 4, 2026
20a7100
Lint code with ESLint and Prettier
grantfitzsimmons Jul 4, 2026
897fb1b
feat(trees): add biostrat search filtering
grantfitzsimmons Jul 4, 2026
87ab9a2
fix(QueryComboBox): fix search in qcbx dialog
grantfitzsimmons Jul 4, 2026
21a40a1
Merge branch 'issue-8256' of https://github.com/specify/specify7 into…
grantfitzsimmons Jul 4, 2026
90f0ed9
Lint code with ESLint and Prettier
grantfitzsimmons Jul 4, 2026
41b8c02
feat(tests): add BioStrat filter tests
grantfitzsimmons Jul 4, 2026
7d49186
Merge branch 'issue-8256' of https://github.com/specify/specify7 into…
grantfitzsimmons Jul 4, 2026
7bc61a2
Lint code with ESLint and Prettier
grantfitzsimmons Jul 4, 2026
8ca11a3
fix(trees): make sure arrows appear correctly
grantfitzsimmons Jul 4, 2026
1d289f3
Merge branch 'issue-8256' of https://github.com/specify/specify7 into…
grantfitzsimmons Jul 4, 2026
15fa14b
fix(trees): filter tree descendants by biostrat
grantfitzsimmons Jul 4, 2026
56be873
Merge pull request #8257 from specify/issue-8256
grantfitzsimmons Jul 7, 2026
2552c74
Lint code with ESLint and Prettier
grantfitzsimmons Jul 7, 2026
f87e791
Merge origin/main into issue-6049 and resolve trees conflict
Copilot Jul 7, 2026
4e666b7
Merge remote-tracking branch 'origin/issue-6049' into issue-6049
Copilot Jul 7, 2026
1910390
Update specifyweb/frontend/js_src/lib/components/TreeView/index.tsx
grantfitzsimmons Jul 7, 2026
0bcf1fd
fix: remove unused import
grantfitzsimmons Jul 7, 2026
9705c73
Test: Fix backend tree tests
Jul 8, 2026
b06e6c5
Merge branch 'main' into issue-6049
CarolineDenis Jul 8, 2026
ea43a4e
Fix: Fix localization
Jul 8, 2026
d352b11
Potential fix for pull request finding 'CodeQL / Testing equality to …
CarolineDenis Jul 8, 2026
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
35 changes: 21 additions & 14 deletions specifyweb/frontend/js_src/lib/components/TreeView/Row.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,27 +84,34 @@ export function TreeRow<SCHEMA extends AnyTree>({
if (!isLoading) return undefined;

void getRows(row.nodeId).then((fetchedRows: RA<Row>) => {
const sortedRows = Array.from(fetchedRows).sort(
sortFunction<Row, number | string>(
orderByField === 'rankId'
? (row) => row.rankId
: orderByField === 'nodeNumber'
? (row) => row.nodeNumber
: orderByField === 'name'
? (row) => row.name
: orderByField === 'fullName'
? (row) => row.fullName
: () => 0
)
);
const sortedRows =
treeName === 'GeologicTimePeriod'
? /*
* GeologicTimePeriod shoud always be sorted by startPeriod.
* This skips the client-side sort to preserve that order.
*/
fetchedRows
: Array.from(fetchedRows).sort(
sortFunction<Row, number | string>(
orderByField === 'rankId'
? (row) => row.rankId
: orderByField === 'nodeNumber'
? (row) => row.nodeNumber
: orderByField === 'name'
? (row) => row.name
: orderByField === 'fullName'
? (row) => row.fullName
: () => 0
)
);
destructorCalled ? undefined : setRows(sortedRows);
});

let destructorCalled = false;
return (): void => {
destructorCalled = true;
};
}, [isLoading, getRows, row, orderByField]);
}, [isLoading, getRows, row, orderByField, treeName]);

// Fetch children stats
const isLoadingStats = displayChildren && childStats === undefined;
Expand Down
11 changes: 7 additions & 4 deletions specifyweb/frontend/js_src/lib/components/TreeView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,14 @@ function TreeView<TREE_NAME extends AnyTree['tableName']>({
async (parentId: number | 'null') =>
fetchRows(
// See above comment for sortField being hard coded as name here
formatUrl(`${baseUrl}/${parentId}/name/`, {
includeAuthor: includeAuthor.toString(),
})
formatUrl(
`${baseUrl}/${parentId}/${tableName === 'GeologicTimePeriod' ? 'startPeriod' : 'name'}/`,
{
includeAuthor: includeAuthor.toString(),
}
)
),
[baseUrl]
[baseUrl, tableName, includeAuthor]
);

const [rows, setRows] = useAsyncState<RA<Row>>(
Expand Down
Loading