Skip to content

Conversation

@RoyEJohnson
Copy link
Contributor

@RoyEJohnson RoyEJohnson commented Aug 28, 2025

CORE-1129
File changes are in the first commit. Tests are in the second commit. Prettier is the third.
I have annotated some unexpected changes. For files that show as deleted and created, you can see them as diffs in the first commit.

}

function showTooltip(schoolInfo, flyThere) {
function showTooltip(schoolInfo: AugmentedInfo) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing was using flyThere

@RoyEJohnson RoyEJohnson force-pushed the core-1060-port-separatemap-page-to-ts branch from 56453ee to 10e14a0 Compare August 28, 2025 21:54
const mapZoom = isMobileDisplay() ? 2 : 3;
const map = React.useMemo(
() => new Map({
() => createMap({
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yikes. It wasn't a constructor.

(event) => setInstitution(event.target.value),
[setInstitution]
);
const options = [
Copy link
Contributor Author

@RoyEJohnson RoyEJohnson Aug 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having this defined inside the function was causing rerenders. This file is shown as changes in the first commit.


.search-clear {
cursor: pointer;
appearance: none;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed it from a clickable icon with role="button" to a button element.

function SearchAndClear({
placeholder='Search by country, state, city, or institution name',
textValue='',
placeholder,
Copy link
Contributor Author

@RoyEJohnson RoyEJohnson Aug 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's only called by one function, and that provides values for these parameters.

has

Update result-box.tsx
@RoyEJohnson RoyEJohnson force-pushed the core-1060-port-separatemap-page-to-ts branch from 10e14a0 to 28b9816 Compare August 28, 2025 22:08
@@ -0,0 +1,152 @@
import React from 'react';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes in the first commit

@@ -0,0 +1,61 @@
import {useState, useEffect} from 'react';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See first commit

resultsOrSchool?.map((school) =>
<ResultBox
model={school} totalCount={resultsOrSchool.length} key={school.pk}
model={school} key={school.pk}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently the totalCount parameter went away some time ago in ResultBox.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test was subsumed by separatemap.test

@RoyEJohnson RoyEJohnson force-pushed the core-1060-port-separatemap-page-to-ts branch from 28b9816 to 8e617a0 Compare August 28, 2025 22:17
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test subsumed by new tests

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

File diffs are in the first commit

@RoyEJohnson RoyEJohnson requested a review from jivey August 28, 2025 22:23
@RoyEJohnson RoyEJohnson merged commit ae060e8 into main Sep 3, 2025
1 check passed
@RoyEJohnson RoyEJohnson deleted the core-1060-port-separatemap-page-to-ts branch September 3, 2025 15:07
@RoyEJohnson RoyEJohnson restored the core-1060-port-separatemap-page-to-ts branch September 3, 2025 15:07
@RoyEJohnson RoyEJohnson deleted the core-1060-port-separatemap-page-to-ts branch September 3, 2025 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants