Skip to content

Commit

Permalink
Merge pull request #138 from RENCI/#137-share-view-tray
Browse files Browse the repository at this point in the history
Moving the share view functionality to the tray
  • Loading branch information
PhillipsOwen authored Aug 5, 2024
2 parents da0ac9d + 0e5ffd0 commit be3b8a0
Show file tree
Hide file tree
Showing 13 changed files with 157 additions and 266 deletions.
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>
);
File renamed without changes.
Loading

0 comments on commit be3b8a0

Please sign in to comment.