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

[MRXN23-616] adds info tooltip next to export scenario results button #1672

Merged
merged 1 commit into from
Apr 3, 2024
Merged
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
36 changes: 22 additions & 14 deletions app/layout/project/sidebar/project/scenarios-list/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import { useToasts } from 'hooks/toast';
import Button from 'components/button';
import ConfirmationPrompt from 'components/confirmation-prompt';
import Icon from 'components/icon';
import InfoButton from 'components/info-button';
import Loading from 'components/loading';
import Modal from 'components/modal';
import { ScrollArea } from 'components/scroll-area';
Expand Down Expand Up @@ -367,20 +368,27 @@ export const ScenariosList: React.FC = () => {
{(hasScenarios || search || hasFilters) && (
<Section className="flex w-full flex-col items-center justify-center space-y-5">
{hasScenarios && (
<Button
theme="primary-alt"
size="base"
className="flex w-full overflow-hidden uppercase"
disabled={solutionsReportLoader || !atLeastOneScenarioIsRun}
onClick={onDownloadSolutionsSummary}
>
<Loading
visible={solutionsReportLoader}
className="absolute bottom-0 left-0 right-0 top-0 z-40 flex h-full w-full items-center justify-center bg-gray-900 bg-opacity-90"
iconClassName="w-10 h-10 text-primary-500"
/>
{`Export scenario${scenariosData.length > 1 ? 's' : ''} results`}
</Button>
<div className="flex w-full items-center space-x-5">
<Button
theme="primary-alt"
size="base"
className="flex w-full flex-1 overflow-hidden uppercase"
disabled={solutionsReportLoader || !atLeastOneScenarioIsRun}
onClick={onDownloadSolutionsSummary}
>
<Loading
visible={solutionsReportLoader}
className="absolute bottom-0 left-0 right-0 top-0 z-40 flex h-full w-full items-center justify-center bg-gray-900 bg-opacity-90"
iconClassName="w-10 h-10 text-primary-500"
/>
{`Export scenario${scenariosData.length > 1 ? 's' : ''} results`}
</Button>
<InfoButton>
<span>
Export Mapp Scenario codes, best solutions and selection frequency results.
</span>
</InfoButton>
</div>
)}
<Button
theme="primary"
Expand Down
Loading