Conversation
|
Sorry, didn't review it yet. Wrong button hit |
offtherailz
left a comment
There was a problem hiding this comment.
- The button should be at least below the spinner, not above.
Also a tooltip should be visible. - The editor for images has some problems imho: I suggested this approch (see "Alignment + Resize + Focus + Drag'n'Drop + Drag'n'Drop Upload Example") :
https://www.draft-js-plugins.com/plugin/image .

Instead see this:

Did I missed something in the communication or installing libs? It looks somehow incomplete (buttons do not work). If we are going to implement draft-js image part in a separate PR, please remove alignment buttons that do not work. - The UI to set details option is a little hard to use and understand. You must pass from the home page to create details, then for options set-up you have to open the map. Details are saved automatically when you close the panel and to remove the details you have to go back to the home page. @tdipisa I think we could improve a little bit, do we have a mock-up?

Note: in this gif I set up the settings before, on a detail card that I removed, to open on startup. For this reason first time it appears, but by default the behaviour is the current, render in a panel, not open on startup
|
About the last point, I sync about it with @tdipisa and we found the following solution: CreateCreate should be possible also from option menu. An entry visible only to the editor allows to create or edit details for the current map. It will open the same window of detail map, in edit mode. EditIn order to uniform the UI the details saving will appen when the user click on a save button (visible only to the editor) at the bottom.It will save both text and options. RemoveAnother button should be visible in the toolbar, if the detail card has been saved, to delete (with a trash icon). ViewThe button in navigation toolbar should work as now (with a lower position) in order to allow users in view mode only to see the detail card in view mode. |
@offtherailz I have addressed this point specifically in the PR description:
Also buttons work, but their functionality is limited. See "Unesco Italian Items" map for an example. |
|
mmm... it's ok, but anyway the current image tool is very hard to be used. |
@offtherailz To use plugins one must use Editor component from draft-js-plugins-editor, that actually has an ability to accept plugins. The wysiwyg editor seems to be using Editor from draft-js. The problem it seems to me has two solutions: creating a new editor based on draft-js-plugins-editor from scratch or try to extend the existing functionality of react-wysiwyg-editor either by writing custom components or forking the entire project and making necessary reworks/changes. |
|
@vlt1 I think at the end we will need to to something like creating a new edtiror from draft-js, because the image handling from wysiwyg is very hard for a user. |
|
@offtherailz If I understood correctly, to sum up:
Everything else stays the same. Correct? Also, what should be done when the user is on a new map? Details are stored as a separate resource and their id is stored as an attribute of the map resource. When the user is working with the new map, that hasn't been saved yet, the map resource doesn't exist so we can't update the attribute. What is the desired behaviour in this case? |
Yes, if you're allowed to edit it.
Yes, good idea. But see my last comment.
Yes... this sometimes is good, sometimes is bad. But I think we should keep this behaviour of explicit save contextual to the map save. Do you agree @tdipisa ?Maybe this should be notified together with the other map changes to avoid the user to leave the map without saving
Yes
Now that I see this comment, I think we can include your work as a renew of the "Detail sheet" in the save modal, instead of a button of the menu... What if this tool is accessible from the SaveModal, instead, as for the home page? This can be a finalization for this task: |
|
Ok. I discussed with @tdipisa about this task and we decided to split it in 2 tasks. I'm going to block this PR for the moment to split better the work in different pices: First of all please work on #5772 Basically the issue replaces the editor-only entry in the Burger Menu option. Everything becomes uniform in home page and map viewer. Then you can add your changes with new option buttons. note: at the end window to edit the detail card in the home page will be the same in home page and map, with same options on top, and same wysiwyg editor. note we forked react-wysiwyg, so we can check if we makes sense to improve the editor with the suggestions in this discussion. |
|
@offtherailz now that the Uniformation is merged, I can proceed with this. Lets iron out the specifics:
I will also probably create a new pr from a new branch, it seems easier then merging at this point. |
|
Closing in favor of #5861 |


Description
Contains austrocontrol-C125/#160 and austrocontrol-C125/#162 since austrocontrol-C125/#162 depends on changes in austrocontrol-C125/#160.
For the former issue #5295 pr has been opened and reviewed. This pr adds new details editor based on Stories editor. Since Stories editor uses an already available wysiwyg editor built on draftJS(react-draft-wysiwyg), that makes it impossible to use plugins mentioned in the issue description, as that would require building a new draftJS based editor from scratch. The editor used in Stories, though, supports image manipulation that I enabled and adapted to the use case. It should be noted that Image manipulation component as well editor's block rendering function can be both overriden with custom components and supplied to react-draft-wysiwyg editor if needs be. For now I just made sure that the already existing functionality works as expected.
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (check one with "x", remove the others)
Issue
austrocontrol-C125/#160
austrocontrol-C125/#162
What is the current behavior?
Map details can be edited only through MetadataModal in MapsGrid.
What is the new behavior?
Map details can be edited in MetadataModal as well as in Details map plugin with features as described in austrocontrol-C125/#160. Also a new Details editor based on Stories editor with image manipulation is made available in both MetadataModal and Details plugin.
Breaking change
Does this PR introduce a breaking change? (check one with "x", remove the other)