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

Remove user announcement and tour message (on study page) #2670

Merged
merged 1 commit into from
Sep 9, 2019
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
25 changes: 12 additions & 13 deletions src/pages/studyView/StudyViewPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ import AppConfig from "appConfig";
import SocialAuthButton from "../../shared/components/SocialAuthButton";
import {ServerConfigHelpers} from "../../config/config";
import { getStudyViewTabId } from './StudyViewUtils';
import InfoBeacon from "shared/components/infoBeacon/InfoBeacon";
import {WrappedTour} from "shared/components/wrappedTour/WrappedTour";

export interface IStudyViewPageProps {
routing: any;
Expand Down Expand Up @@ -163,17 +161,18 @@ export default class StudyViewPage extends React.Component<IStudyViewPageProps,
get groupsButton() {
return (
<>
<If condition={!isWebdriver()}>
<InfoBeacon
top={-15}
right={45}
interaction={'mouseover'}
color={'green'}
id={'groupComparison1'}
>
<WrappedTour/>
</InfoBeacon>
</If>
{/* MODEL FOF USER OF INFO BEACON. YOU NEED TO CUSTOMIZE <WrappedTour> COMPONENT FOR USE CASE */}
{/*<If condition={!isWebdriver()}>*/}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

leaving this in as poor man's documentation for our next usage of this. where else does this belong? ReadME? Wiki?

Copy link
Member

Choose a reason for hiding this comment

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

Could maybe add it here in a new section? https://docs.cbioportal.org/4.-development/release-procedure. Prolly good to add some comment above this as well, like "uncomment to show a green info beacon at the top of the page, useful to highlight a new feature defined in Usermessage.tsx".

{/* <InfoBeacon*/}
{/* top={-15}*/}
{/* right={45}*/}
{/* interaction={'mouseover'}*/}
{/* color={'green'}*/}
{/* id={'groupComparison1'}*/}
{/* >*/}
{/* <WrappedTour/>*/}
{/* </InfoBeacon>*/}
{/*</If>*/}
<DefaultTooltip
visible={this.showGroupsTooltip}
trigger={["click"]}
Expand Down
22 changes: 10 additions & 12 deletions src/shared/components/userMessager/UserMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {isWebdriver} from "shared/lib/tracking";

export interface IUserMessage {
dateStart?:number;
title:string;
dateEnd:number;
content:string;
id:string;
Expand All @@ -22,23 +21,22 @@ function makeMessageKey(id:string){
return `portalMessageKey-${id}`;
}

const MESSAGE_DATA_TEST: IUserMessage[] = [
{
dateEnd:100000000000000,
content: `<strong>Announcing the new Group Comparison feature</strong>: Compare clinical and genomic features of user-defined groups of samples/patients. <a class='btn btn-primary' href="/tutorials#group-comparison" target="_blank">View Tutorial</a>`,
id:'3.0-intro',
title:'Announcing the Group Comparison feature of cBioPortal 3.0!'
}
const MESSAGE_DATA: IUserMessage[] = [
// ADD MESSAGE IN FOLLOWING FORMAT
// UNIQUE ID IS IMPORTANT B/C WE REMEMBER A MESSAGE HAS BEEN SHOWN
// BASED ON USERS LOCALSTORAGE
// {
// dateEnd:100000000000000,
// content: `<p>Some markup and message here</p>`,
// id:'some very unique ID here, e.g. 3.0-intro',
// }
];


@observer
export default class UserMessager extends React.Component<{ dataUrl?:string }, {}> {

messageData = remoteData<IUserMessage[]>(async ()=>{
//const data = await request(this.props.dataUrl);
return Promise.resolve(MESSAGE_DATA_TEST);

return Promise.resolve(MESSAGE_DATA);
});

@observable dismissed = false;
Expand Down