Skip to content

Commit

Permalink
One entry for components (#1099)
Browse files Browse the repository at this point in the history
**Related Ticket:**  #1089 

### Description of Changes
Make one entry file for all the components that are used in an instance.
I thought about using library entry file, but some of the components
will interrupt the library building, and I don't really want to blur the
scope of this PR.

### Notes & Questions About Changes

This idea was really nice in my brain.. but now that I see the changes,
I am not sure if this would be a better way to use the components from
VEDA UI or not. It is surely nice that we don't have to worry about
moving components around in the source code. But I'm not sure if
importing literally everything from veda-ui-scripts is a good idea or
not - We can try to have more structured exports, but I don't really
want to add any maintenance efforts of this file. This is how it looks
like in the instance - it makes the code look a bit unorganized. But it
may be fine?:
US-GHG-Center/veda-config-ghg@develop...US-GHG-Center:veda-config-ghg:use-etnry-for-instance

Can y'all give me your thoughts? @sandrahoang686 @dzole0311 Also
@slesaad - How do you think about importing all the components needed
from one entry file like this?
US-GHG-Center/veda-config-ghg@develop...US-GHG-Center:veda-config-ghg:use-etnry-for-instance#diff-546348a53a9dc4b9a8f244b185ac088f93fe7a5573cfc39617f7e8bd9a471d00R27
  • Loading branch information
hanbyul-here authored Aug 15, 2024
2 parents c66d2ad + 3f8a101 commit 551cb5e
Showing 1 changed file with 73 additions and 0 deletions.
73 changes: 73 additions & 0 deletions app/scripts/instance.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
// @NOTE: Components used directly by instances
// Ensure this file is updated whenever components listed here are moved or modified.

import { Card } from "$components/common/card";
import { CardFooter } from "$components/common/card/styles";

import {
Continuum,
ContinuumGridItem,
ContinuumCardsDragScrollWrapper,
ContinuumDragScroll
} from '$styles/continuum';
import { ContinuumScrollIndicator } from '$styles/continuum/continuum-scroll-indicator';
import { useReactIndianaScrollControl } from '$styles/continuum/use-react-indiana-scroll-controls';
import { continuumFoldStartCols } from '$components/common/featured-slider-section';
import { Pill } from '$styles/pill';

import Constrainer from "$styles/constrainer";
import {
Figcaption,
Figure,
FigureAttribution,
} from "$components/common/figure";

import { Tip } from "$components/common/tip";
import { variableGlsp } from "$styles/variable-utils";
import {
STORIES_PATH,
DATASETS_PATH,
ANALYSIS_PATH,
ABOUT_PATH,
} from "$utils/routes";
import { useFeedbackModal } from "$components/common/layout-root";
import { useMediaQuery } from "$utils/use-media-query";
import { getLinkProps } from "$utils/url";

import { FoldProse } from "$components/common/fold";
import { VarHeading } from "$styles/variable-components";

import Hug from "$styles/hug";
import { Actions } from "$components/common/browse-controls/use-browse-controls";
import Image from "$components/common/blocks/images";

export {
STORIES_PATH,
DATASETS_PATH,
ANALYSIS_PATH,
ABOUT_PATH,
continuumFoldStartCols,
getLinkProps,
useMediaQuery,
useFeedbackModal,
useReactIndianaScrollControl,
variableGlsp,
Actions,
Card,
CardFooter,
Constrainer,
Continuum,
ContinuumGridItem,
ContinuumCardsDragScrollWrapper,
ContinuumDragScroll,
ContinuumScrollIndicator,
Figcaption,
Figure,
FigureAttribution,
FoldProse,
Hug,
Image,
Pill,
Tip,
VarHeading
};

0 comments on commit 551cb5e

Please sign in to comment.