feat: add edit image from storage on mobile editors#70
Conversation
56b18c1 to
71ad435
Compare
moodyjmz
left a comment
There was a problem hiding this comment.
Thanks @n-goncalves — looks good overall, and it matches how the desktop editors do it (DE/PE ImgApply, SSE asc_setGraphicObjectProps; put_ImageUrl is a valid alias of asc_putImageUrl in the cell SDK, so that's fine too). Nice touch putting the icon in common/.
One behavioural regression flagged inline — the missing-c fallback to "add" got dropped. It applies to all three editors; suggestions attached so it's a one-click fix.
Couple of non-blocking nits: changeCanRequestInsertImage is registered in makeObservable in the three stores but never called (the value is assigned directly in setConfigOptions), and indentation is off in the new JSX blocks in DE/PE view/add/AddImage.jsx.
|
Thanks for the catch on the empty For the minor nitpicks, I have fixed the indentation in the new JSX blocks in DE/PE view/add/AddImage.jsx. I wrote the first iteration of this years ago, I assume I wanted to do something with it at first but never did. |
There was a problem hiding this comment.
Thanks for addressing all the previous round's suggestions — the dispatch fallback and the guard corrections are both clean.
Two things still to tidy:
1. PE view/add/AddImage.jsx — </List> indent
The closing tag landed at 8-space indent while <List> and everything inside it sits at 12. DE got this right; PE just needs the closer brought in one level.
2. SSE storeAppOptions.js — canRequestInsertImage in makeObservable
Worth a quick check: the SSE store uses an explicit makeObservable call that enumerates each observable field. The diff doesn't show canRequestInsertImage being added to that block — only the class field and the setConfigOptions assignment. If it's actually absent, MobX won't track it for reactivity (plain JS property, observer components won't re-render on change). Functionally fine for a config-once value, but worth confirming the intent is deliberate — or adding canRequestInsertImage: observable to match the other config flags in that block.
Minor nit: there's a stray double blank line after onInsertByStorage in the PE and SSE add controllers — single blank is enough.
Signed-off-by: n-goncalves <n-goncalves@users.noreply.github.com>
Signed-off-by: n-goncalves <n-goncalves@users.noreply.github.com>
Signed-off-by: n-goncalves <n-goncalves@users.noreply.github.com>
Co-authored-by: James Manuel <moodyjmz@users.noreply.github.com> Signed-off-by: n-goncalves <35218229+n-goncalves@users.noreply.github.com> Signed-off-by: n-goncalves <n-goncalves@users.noreply.github.com>
Co-authored-by: James Manuel <moodyjmz@users.noreply.github.com> Signed-off-by: n-goncalves <35218229+n-goncalves@users.noreply.github.com> Signed-off-by: n-goncalves <n-goncalves@users.noreply.github.com>
Co-authored-by: James Manuel <moodyjmz@users.noreply.github.com> Signed-off-by: n-goncalves <35218229+n-goncalves@users.noreply.github.com> Signed-off-by: n-goncalves <n-goncalves@users.noreply.github.com>
Co-authored-by: James Manuel <moodyjmz@users.noreply.github.com> Signed-off-by: n-goncalves <35218229+n-goncalves@users.noreply.github.com> Signed-off-by: n-goncalves <n-goncalves@users.noreply.github.com>
Co-authored-by: James Manuel <moodyjmz@users.noreply.github.com> Signed-off-by: n-goncalves <35218229+n-goncalves@users.noreply.github.com> Signed-off-by: n-goncalves <n-goncalves@users.noreply.github.com>
Co-authored-by: James Manuel <moodyjmz@users.noreply.github.com> Signed-off-by: n-goncalves <35218229+n-goncalves@users.noreply.github.com> Signed-off-by: n-goncalves <n-goncalves@users.noreply.github.com>
Signed-off-by: n-goncalves <n-goncalves@users.noreply.github.com>
Signed-off-by: n-goncalves <n-goncalves@users.noreply.github.com>
Signed-off-by: n-goncalves <n-goncalves@users.noreply.github.com>
3ae5e8b to
a2d5e55
Compare
Resolved.
The But if I look at similar variables like for instance You mention only the SSE
Resolved for PE add controller. I have checked the SSE add controller but there is a single blank line there. |
|
Looking good, one tiny, tiny thing canRequestInsertImage is set once, however I think it should be observable like the others, per editor.
makeObservable(this, {
....
canRequestInsertImage: observable, // <<< add this
});Once that's done, I'll approve and merge - if you agree with those changes :) |
Signed-off-by: n-goncalves <n-goncalves@users.noreply.github.com>
This PR allow to add and replace existing images using the storage server on mobile for documenteditor, presentationeditor and spreadsheeteditor.
Edit: force-pushed to close the modal when button is clicked on as that's what happens when choosing a local file.