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

add tooltip in bibtex reference list #435

Merged
merged 6 commits into from
Jun 16, 2023
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
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
registry=https://registry.yarnpkg.com
6 changes: 6 additions & 0 deletions app/assets/scripts/components/documents/collaborators-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ import { CollaboratorUserIdentity } from '../common/user-selectable-list';
import { useContextualAbility } from '../../a11n';
import { isReviewDone } from './status';

import FormInfoTip from '../common/forms/form-info-tooltip';

const TooltipContent =
"For more information on how to add collaborators and how to change the lead author, please watch <a target='_blank' rel='noreferrer' href='https://drive.google.com/file/d/1BMgM5nWcrhvetfPM1Q53gnZ_IudclYpO/view?usp=share_link'>this video</a>.";

const shadowScrollbarProps = {
autoHeight: true,
autoHeightMax: 320
Expand Down Expand Up @@ -67,6 +72,7 @@ const CollaboratorsMenuContent = (props) => {
>
Manage
</Button>
<FormInfoTip title={TooltipContent} />
</DropActions>
)}
</DropHeader>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import React from 'react';
import T from 'prop-types';
import { Button } from '@devseed-ui/button';
import FormInfoTip from '../../../common/forms/form-info-tooltip';

import { FauxFileDialog } from '../../../common/faux-file-dialog';

const TooltipContent =
"For more information about BibTeX, and to learn how to import a BibTeX file into APT, please watch <a target='_blank' rel='noreferrer' href='https://drive.google.com/file/d/11SX-BQLdqoZqGPKRim9vKny182sAfoEx/view'>this video</a>.";

export default function ReferencesCreationActions(props) {
const { onAddClick, onFileSelect } = props;

Expand All @@ -14,9 +18,12 @@ export default function ReferencesCreationActions(props) {
</Button>
<FauxFileDialog name='bibtex-file' onFileSelect={onFileSelect}>
{(fieProps) => (
<Button useIcon='upload-2' {...fieProps}>
Import from BibTeX file
</Button>
<>
<Button useIcon='upload-2' {...fieProps}>
Import from BibTeX file
</Button>
<FormInfoTip title={TooltipContent} />
</>
)}
</FauxFileDialog>
</React.Fragment>
Expand Down