Skip to content
Open
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
Binary file added src/firefly/html/images/Background_Firefly.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 14 additions & 12 deletions src/firefly/js/Firefly.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ import 'styles/global.css';
import {APP_LOAD, dispatchAppOptions, dispatchConnectionStatus, dispatchUpdateAppData, getConnectionStatus} from './core/AppDataCntlr.js';
import {FireflyViewer} from './templates/fireflyviewer/FireflyViewer.js';
import {FireflySlate} from './templates/fireflyslate/FireflySlate.jsx';
import {LandingPage} from './templates/fireflyviewer/LandingPage.jsx';
import {StandaloneFireflyLanding} from './templates/fireflyviewer/StandaloneFireflyLanding.jsx';
import {LcViewer} from './templates/lightcurve/LcViewer.jsx';
import {HydraViewer} from './templates/hydra/HydraViewer.jsx';
import {routeEntry, ROUTER} from './templates/router/RouteHelper.jsx';
import {initApi} from './api/ApiBuild.js';
import {dispatchUpdateLayoutInfo} from './core/LayoutCntlr.js';
import {dispatchShowDropDown, dispatchUpdateLayoutInfo} from './core/LayoutCntlr.js';
import {FireflyRoot} from './ui/FireflyRoot.jsx';
import {SIAv2SearchPanel} from './ui/tap/SIASearchRootPanel';
import {getSIAv2ServicesByName} from './ui/tap/SiaUtil';
Expand All @@ -45,7 +45,6 @@ import {loadAllJobs} from './core/background/BackgroundUtil.js';
import {
makeDefImageSearchActions, makeDefTableSearchActions, makeDefTapSearchActions, makeExternalSearchActions
} from './ui/DefaultSearchActions.js';
import {useStoreConnector} from 'firefly/ui/SimpleComponent';

let initDone = false;
const logger = Logger('Firefly-init');
Expand Down Expand Up @@ -119,7 +118,7 @@ const defAppProps = {
showUserInfo: false,
showViewsSwitch: true,
rightButtons: undefined,
landingPage: <LandingPage/>,
landingPage: <StandaloneFireflyLanding/>,
fileDropEventAction: 'FileUploadDropDownCmd',

menu: [
Expand Down Expand Up @@ -340,22 +339,25 @@ function setupGatorProtocolPanel(installedOptions, appProps) {
*/
export function startAsAppFromApi(divId, overrideProps={template: 'FireflySlate'}) {


// TODO: test and improvise the look
const Message = ({}) => (
<Stack alignItems='center'>
<Typography sx={{fontSize: 'xl4'}} color='neutral'> Welcome to Firefly Viewer for Python</Typography>
</Stack>
);

const landingPage= (<LandingPage slotProps={{
const landingPage = (<StandaloneFireflyLanding slotProps={{
topSection: {component: Message},
bottomSection : {
bottomSection: {
actionItems: [
{ text: 'Use API to send data', subtext: 'load data using Python API' },
{ text: 'Search for data', subtext: 'using the tabs above or side menu' },
{ text: 'Upload a file', subtext: 'drag & drop here' }
]
}
{title: 'Use API to send data', desc: 'load data using Python API'},
{title: 'Search for data', desc: 'using the tabs above or side menu',
onClick: () => dispatchShowDropDown({view: 'TAPSearch'})},
{title: 'Upload a file', desc: 'drag & drop here',
onClick: () => dispatchShowDropDown({view: 'FileUploadDropDownCmd'})},
],
chips: [],
},
}}/>);

const props = {
Expand Down
24 changes: 24 additions & 0 deletions src/firefly/js/templates/fireflyviewer/LandingPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,30 @@ import {FileDropZone} from '../../visualize/ui/FileUploadViewPanel.jsx';
import {APP_HINT_IDS, AppHint, HINT_TIP_PLACEMENTS} from 'firefly/ui/AppHint';


/**
* Full-page landing screen shown before the user has any results to display.
* Wraps content in a {@link FileDropZone} so drag-and-drop file upload works everywhere.
* AppHint overlays (tabs menu, background monitor) are mounted automatically when relevant.
*
* All visual regions are customizable via `slotProps`. Each slot accepts an optional `component`
* key to replace the default renderer; all remaining keys are forwarded as props to that component.
*
* Slot layout:
* ```
* tabsMenuHint → AppHint (anchored to first tab after Results tab)
* bgMonitorHint → AppHint (anchored to last tab: Job Monitor)
* ┌─ bgContainer (Box) ──────────────────────────────────────┐
* │ ┌─ contentSection (Stack) ───────────────────────────┐ │
* │ │ topSection → DefaultAppBranding (title/desc) │ │
* │ │ bottomSection → EmptyResults (actions) │ │
* │ └────────────────────────────────────────────────────┘ │
* └──────────────────────────────────────────────────────────┘
Comment on lines +26 to +31
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very helpful!

* ```
*
* @param {object} props
* @param {object} [props.slotProps={}] - Per-slot overrides (see layout above).
* @param {object} [props.sx] - sx forwarded to the root Sheet.
*/
export function LandingPage({slotProps={}, sx, ...props}) {
const {appTitle,footer,
fileDropEventAction='FileUploadDropDownCmd'} = useContext(AppPropertiesCtx);
Expand Down
Loading