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

Moving the share view functionality to the tray #138

Merged
merged 5 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 0 additions & 2 deletions src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { useLayers } from '@context';
import { Sidebar } from '@components/sidebar';
import { ControlPanel } from '@components/control-panel';
import { MapLegend } from '@components/legend';
import { Share } from '@share/share';

/**
* renders the main content
Expand Down Expand Up @@ -35,7 +34,6 @@ const Content = () => {
<Sidebar />
<ControlPanel/>
<MapLegend />
<Share />
</Fragment>
);
};
Expand Down
132 changes: 0 additions & 132 deletions src/components/share/buildlink.js

This file was deleted.

3 changes: 0 additions & 3 deletions src/components/share/index.js

This file was deleted.

78 changes: 0 additions & 78 deletions src/components/share/screenshot.js

This file was deleted.

44 changes: 0 additions & 44 deletions src/components/share/share.js

This file was deleted.

5 changes: 3 additions & 2 deletions src/components/trays/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@ import * as layers from './layers';
import * as model_selection from './model-selection';
import * as remove_items from './remove';
import * as settings from './settings';
import * as share_view from './share';
import * as help_about from './help-about';
//import * as screen_shot from './screenshot';


export default {
layers,
hurricanes,
model_selection,
remove_items,
settings,
share_view,
help_about
// ,screen_shot
};

/*
Expand Down
3 changes: 0 additions & 3 deletions src/components/trays/layers/tray-contents.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
} from '@mui/icons-material';
import { LayersList } from './list';
import { AddLayerForm } from './form';
import { ShareComment } from '@share/share-comment';

const FORM = 'FORM';
const LIST = 'LIST';
Expand Down Expand Up @@ -54,8 +53,6 @@ export const TrayContents = () => {
}}>
{ state === LIST && <LayersList /> }

<ShareComment/>

{ state === FORM && <AddLayerForm /> }

<TrayFooter />
Expand Down
2 changes: 1 addition & 1 deletion src/components/trays/model-selection/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ export const title = 'ADCIRC Model selection';
*/
export const trayContents = () => (
<Stack gap={ 2 } p={ 2 }>
<ModelSelection />
<ModelSelection />
</Stack>
);
25 changes: 25 additions & 0 deletions src/components/trays/share/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
export * from './share_view';

import React from 'react';
import { Stack } from '@mui/joy';
import { Share as ShareViewIcon} from '@mui/icons-material';

// import the component that will allow the user to make model selections
import { ShareView } from "./share_view.js";

// get an icon for the tray
export const icon = <ShareViewIcon />;

// create a title for this tray element
export const title = 'Share your view';

/**
* render the removal component
*
* @returns {JSX.Element}
*/
export const trayContents = () => (
<Stack gap={ 2 } p={ 2 }>
<ShareView />
</Stack>
);
Loading