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

Various fixes for E&A #1229

Merged
merged 10 commits into from
Nov 6, 2024
Prev Previous commit
Next Next commit
Revert temporary work around
hanbyul-here committed Nov 1, 2024
commit dc0408a172b4e7c0ebe1c031a5fdc34df3be0f30
7 changes: 1 addition & 6 deletions app/scripts/components/exploration/atoms/dates.ts
Original file line number Diff line number Diff line change
@@ -29,12 +29,7 @@ export const selectedDateAtom = atomWithUrlValueStability<Date | null>({
return prev.getTime() === next.getTime();
},
dehydrate: (d) => {
// @TODO: temporary to work around
try {
return d?.toISOString() ?? '';
} catch(e) {
return '';
}
return d?.toISOString() ?? '';
}
});


Unchanged files with check annotations Beta

export type AoiChangeListener = (
event: AoiChangeEvent,
payload?: Record<string, any>

Check warning on line 38 in app/scripts/components/common/aoi/types.d.ts

GitHub Actions / lint

Unexpected any. Specify a different type
) => void;
export interface AoiChangeListenerOverload {
break;
}
// mapRef is a ref object.
}, []);

Check warning on line 131 in app/scripts/components/common/aoi/use-aoi-controls.ts

GitHub Actions / lint

React Hook useCallback has a missing dependency: 'mapRef'. Either include it or remove the dependency array. If 'setAoi' needs the current value of 'mapRef', you can also switch to useReducer instead of useState and read 'mapRef' in the reducer
return { aoi, onAoiEvent: onAoiEvent as AoiChangeListenerOverload };
}
totalLayers = [...totalLayers, compareMapStaticData];
}
return totalLayers;
},[layerId]);

Check warning on line 180 in app/scripts/components/common/blocks/block-map.tsx

GitHub Actions / lint

React Hook useMemo has a missing dependency: 'datasetLayers'. Either include it or remove the dependency array
const [layers, setLayers] = useState<VizDataset[]>(layersToFetch);
]);
}
if (!matchingBlocks[`${typeName}${childrenNames}`]) {

Check warning on line 280 in app/scripts/components/common/blocks/index.tsx

GitHub Actions / lint

Unnecessary conditional, value is always falsy
let hints = [
'The only direct children that blocks can have are Figure and Prose.',
'Example:',
}
interface BlockErrorBoundaryProps {
childToRender: any;

Check warning on line 347 in app/scripts/components/common/blocks/index.tsx

GitHub Actions / lint

Unexpected any. Specify a different type
passErrorToChild?: boolean;
className?: string;
children?: ReactNode;
export class BlockErrorBoundary extends Component<
BlockErrorBoundaryProps,
{ error: any }

Check warning on line 355 in app/scripts/components/common/blocks/index.tsx

GitHub Actions / lint

Unexpected any. Specify a different type
> {
static getDerivedStateFromError(error) {
error.CRAOverlayIgnore = true;
return useMemo(() => {
const chapters = Children.toArray(children) as ReactElement<
ChapterProps,
any

Check warning on line 83 in app/scripts/components/common/blocks/scrollytelling/index.tsx

GitHub Actions / lint

Unexpected any. Specify a different type
>[];
if (chapters.some((c) => c.type.displayName !== chapterDisplayName)) {
key={name}
prefix={name}
items={[optionAll].concat(values)}
currentId={(taxonomies[name]? taxonomies[name] as unknown as string : 'all')}

Check warning on line 96 in app/scripts/components/common/browse-controls/index.tsx

GitHub Actions / lint

Unnecessary conditional, value is always truthy
onChange={(v) => {
onAction(FilterActions.TAXONOMY, { key: name, value: v });
}}
</div>
<div id='tags'>
{
tagLabels && (

Check warning on line 93 in app/scripts/components/common/card/horizontal-info-card.tsx

GitHub Actions / lint

Prefer using an optional chain expression instead, as it's more concise and easier to read
tagLabels.map((label) => (
<Pill variation='primary' key={label}>
{label}
emptyStateContent?: React.ReactNode;
search: string;
taxonomies: Record<string, string[]>;
onAction: (action: FilterActions, value?: any) => void;

Check warning on line 36 in app/scripts/components/common/catalog/catalog-content.tsx

GitHub Actions / lint

Unexpected any. Specify a different type
linkProperties: LinkProperties;
pathname?: string;
}