chore: added copilot instructions#169
Draft
mwkyuen wants to merge 1 commit intoBioAnalyticResource:stagingfrom
Draft
chore: added copilot instructions#169mwkyuen wants to merge 1 commit intoBioAnalyticResource:stagingfrom
mwkyuen wants to merge 1 commit intoBioAnalyticResource:stagingfrom
Conversation
mwkyuen
commented
Nov 20, 2025
| 1. **Object views** (simple): `const MyView: View = { name, id, component, ... }` | ||
| 2. **Class views** (complex): `class MyView implements View { constructor(...) { this.component = this.component.bind(this) } }` | ||
|
|
||
| **Routing & View Registration:** |
mwkyuen
commented
Nov 20, 2025
| - `icon()`: JSX icon component for view selector | ||
| - `citation()`: JSX component for data attribution | ||
|
|
||
| **Two Implementation Patterns:** |
Collaborator
Author
There was a problem hiding this comment.
@bdls-jamal can you review this section? Which pattern do you usually use? I don't want there to be 2 patterns, so I'll keep only the pattern that you are using
Collaborator
There was a problem hiding this comment.
Here is an example of the configuration for the heatmap(same as navigator and other views)
const HeatMap: ViewMetadata<HeatMapViewerData, HeatMapViewerState> = {
name: 'HeatMap view',
id: 'heatmap-view',
icon: () => <HeatMapIcon />,
description: 'HeatMap Viewer.',
citation() {
return <div></div>
},
actions: [
{
name: 'Reset Pan/Zoom',
description: 'Reset the pan and zoom of the viewer',
icon: <YoutubeSearchedForRoundedIcon />,
mutation: (prevState) => ({
...prevState,
transform: {
offset: {
x: 0,
y: 0,
},
zoom: 1,
},
}),
},
]
}
I don't think it matches either of the two options generated by copilot but correct me if I am not understanding correctly.
Also, an actual object must also be created in a separate file like so:
export const viewObject = () => {} and then inside it will have constants for initializing the state, theme, outlet context, useQuery, etc. Should all be outlined in the eplant/Eplant/tutorial.md of staging.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.