From c4d0c6ae433b4f590407850d1a4c30a0f8070dd0 Mon Sep 17 00:00:00 2001 From: ramfox Date: Mon, 3 Feb 2020 11:36:35 -0500 Subject: [PATCH] fix(Dataset): add `Hamburger` to dataset actions this adds back the `Copy Cloud Link` and `Unpublish` options --- RELEASE_PROCESS.md | 43 ----------------------------------- app/components/Dataset.tsx | 35 +++++++++++++++++----------- app/scss/_sidebar-layout.scss | 3 +++ 3 files changed, 25 insertions(+), 56 deletions(-) delete mode 100644 RELEASE_PROCESS.md diff --git a/RELEASE_PROCESS.md b/RELEASE_PROCESS.md deleted file mode 100644 index 415f7ced..00000000 --- a/RELEASE_PROCESS.md +++ /dev/null @@ -1,43 +0,0 @@ - -## Release process: -This will only work if you are internal to Qri and have the correct keys - -Before anything, pull master on both a windows and mac machine, run - -`yarn build` -`yarn test-e2e` for mac and `yarn test-win-e2e` for windows - -to ensure we can build on both - -1) change the frontend and backend version numbers in: - `/package.json` - `/app/package.json` - `version.js` -2) run `make update-changelog` to update the changelog -3) write release notes -4) build the correct version of the qri backend binary -5) ensure it is executable (chmod +x qri) -6) move the executable binary to the `/backend` directory -7) run `yarn dist` -8) ensure the Qri Desktop app running correctly and has all the correct version numbers -9) submit a pr, once approved merge -10) run `yarn dist --publish always` to create a release -11) Because notarizing the mac.zip file is broken in electron-builder right now (as per https://snippets.cacher.io/snippet/354a3eb7b0dcbe711383 & https://github.com/electron-userland/electron-builder/issues/4299): - - compress the app file that exists in `/release/mac` - - rename it to match the current mac.zip file in the `/release` directory - - replace the old zip file with the new one - - run `./node_modules/app-builder-bin/mac/app-builder blockmap -i release/Qri\ Desktop-0.3.3-mac.zip -o release/throwaway.zip` - - app-builder is modifying the contents of the zip, which is messing up the notarization. The -o flag indicates an output file that app-builder can futz with without ruining the integrity of the original app - - take the updated file info from size, sha512 and blockMapSize - - update the `/release/latest-mac.yml` with that info - - replace `FILENAME.zip` to the release page -13) On the windows lenova machine, click the `build_qri.bat` file on the desktop - - after it's build, upload it to drop box: `qri/qri Team Folder/qri builds/desktop/windows` - - add it to the release page -14) Add the changelog notes to the release page -12) change link on website to downloads: - - in website/src/pages/download.js, line 10 - `const latestVersion = 'VERSION'` - - create pr, get approval, and merge - -14) click publish on the release! \ No newline at end of file diff --git a/app/components/Dataset.tsx b/app/components/Dataset.tsx index ee4d24fd..50520805 100644 --- a/app/components/Dataset.tsx +++ b/app/components/Dataset.tsx @@ -15,7 +15,7 @@ import NoDatasetSelected from './NoDatasetSelected' import { Modal, ModalType } from '../models/modals' import { defaultSidebarWidth } from '../reducers/ui' import HeaderColumnButton from './chrome/HeaderColumnButton' -import HeaderColumnButtonDropdown from './chrome/HeaderColumnButtonDropdown' +// import HeaderColumnButtonDropdown from './chrome/HeaderColumnButtonDropdown' import DatasetSidebar from '../components/DatasetSidebar' import DetailsBarContainer from '../containers/DetailsBarContainer' import CommitDetails from './CommitDetails' @@ -33,6 +33,7 @@ import { import NoDatasets from './NoDatasets' import { defaultPollInterval } from './App' import { Details } from '../models/details' +import Hamburger from './chrome/Hamburger' export interface DatasetData { workingDataset: WorkingDataset @@ -92,7 +93,8 @@ class Dataset extends React.Component { 'publishUnpublishDataset', 'handleShowStatus', 'handleShowHistory', - 'handleReload' + 'handleReload', + 'handleCopyLink' ].forEach((m) => { this[m] = this[m].bind(this) }) } @@ -178,6 +180,10 @@ class Dataset extends React.Component { remote.getCurrentWindow().reload() } + handleCopyLink () { + clipboard.writeText(`${QRI_CLOUD_URL}/${this.props.data.workingDataset.peername}/${this.props.data.workingDataset.name}`) + } + componentDidUpdate (prevProps: DatasetProps) { const { data, @@ -359,22 +365,25 @@ class Dataset extends React.Component { let publishButton if (username === peername && datasetSelected) { publishButton = published ? ( - { shell.openExternal(`${QRI_CLOUD_URL}/${data.workingDataset.peername}/${data.workingDataset.name}`) }} icon={faCloud} label='View in Cloud' - items={[ -
  • { - e.stopPropagation() - clipboard.writeText(`${QRI_CLOUD_URL}/${data.workingDataset.peername}/${data.workingDataset.name}`) - }}>Copy Link
  • , -
  • { - e.stopPropagation() - setModal({ type: ModalType.UnpublishDataset }) - }}>Unpublish
  • - ]} /> + setModal({ type: ModalType.UnpublishDataset }) + } + ]} /> + ) : (