-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[Feat] Load cloud map with provider #947
Conversation
const response = {
map: {
datasets: [],
config: {},
info: {
title: 'test map',
description: 'Hello this is my test dropbox map'
}
},
// available option: 'csv', 'geojson', 'row', 'keplergl'
format: 'keplergl'
}; Each dataset should either
|
37fb0a8
to
7c8c1f6
Compare
I have a concern with how errors (exceptions) are handled in this PR. Exceptions should be clean instances of I see a lot of downsides to this custom setup and no upsides. (If necessary the error instance can be annotated with additional fields like |
3564a5a
to
ff8b6c6
Compare
can we add the above info to DEVELOPER.MD? |
Hey @ibgreen, which part of the PR are you referring to? |
Signed-off-by: Shan He <[email protected]>
examples/demo-app/src/app.js
Outdated
const {params: {id, provider} = {}, location: {query = {}} = {}} = this.props; | ||
|
||
const cloudProvider = CLOUD_PROVIDERS.find(c => c.name === provider); | ||
if (provider) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (cloudProvider)
if (!token) { | ||
this.login(() => this.downloadMap(loadParams)); | ||
} | ||
const result = await this._dropbox.filesDownload(loadParams); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
try/catch in case of download errors?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to try catch here Errors will be handled by error action passed to react-palm bimap
if (thb['.tag'] === 'success' && thb.thumbnail) { | ||
const matchViz = visualizations[pngs[thb.metadata.id] && pngs[thb.metadata.id].name]; | ||
if (matchViz) { | ||
matchViz.thumbnail = `data:image/gif;base64,${thb.thumbnail}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's create a constant for this prefix: data:image/gif;base64,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
try { | ||
response = await this._dropbox.usersGetCurrentAccount(); | ||
} catch (error) { | ||
Console.warn(error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we return here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
src/components/modal-container.js
Outdated
const toSave = exportMap(this.props); | ||
console.log(toSave); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this
src/reducers/vis-state-updaters.js
Outdated
(f, c) => ({ | ||
// using concat here because the current datasets could be an array or a single item | ||
datasets: f.datasets.concat(c.datasets), | ||
// const loadFileTasks = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we remove this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@heshan0131
b. When filling out name and description tabbing is not working, I can't jump from one field to the other and I have to use the mouse; probably tabbing doesn't work because those two inputs are not part of a form element.
This is from our current website: This is with the new changes |
- add dropbox user name, logout, save image - add load map from dropbox - implement load-storage-map modal and handling loadMaps in provider updater - implement save as Signed-off-by: Shan He <[email protected]>
Signed-off-by: Shan He <[email protected]>
Signed-off-by: Shan He <[email protected]>
Signed-off-by: Shan He <[email protected]>
Signed-off-by: Shan He <[email protected]>
Signed-off-by: Shan He <[email protected]>
Signed-off-by: Shan He <[email protected]>
Signed-off-by: Shan He <[email protected]>
Signed-off-by: Shan He <[email protected]>
Signed-off-by: Shan He <[email protected]>
Signed-off-by: Shan He <[email protected]>
Signed-off-by: Shan He <[email protected]>
Signed-off-by: Shan He <[email protected]>
02b57c0
to
aed7634
Compare
Signed-off-by: Shan He <[email protected]>
Signed-off-by: Shan He <[email protected]>
Signed-off-by: Shan He <[email protected]>
This implements #943
add dropbox user name, logout, save image, list files
implement load-storage-map modal and handling loadMaps in provider updater
Signed-off-by: Shan He [email protected]