Closed Tosh0kan closed 3 years ago
There are some questions:
What options at the top should be hidden? The only thing that makes sense to me is are the write options (and some buttons e.g. apply changes, add row…).
* Should the view directly load into readonly mode? Then we need a configuration option * If not, we need a new button in the option sections (so one can toggle readonly while viewing the table)
Honestly, whatever it's easiest for you to implement. Personally, I'm partial to a new option on the drop down menu when clicking with the right mouse button.
What options at the top should be hidden? The only thing that makes sense to me is are the write options (and some buttons e.g. apply changes, add row…).
Personally, I'm partial to a new option on the drop down menu when clicking with the right mouse button.
The context menu? Hm I don't think this suited for that as all actions in are meant to be applied to one cell/row/column.
As for the options to hide (the 2 "rows"):
write options
and Preview
(and the 2 next buttons) are not needed.hide comments
and help
makes sense in readonly mode.Hiding these will introduce too much extra conditions, disabling is probably the way to go. Disabling also allows to add a new toggle button to switch from readonly to edit mode and vice versa.
I'll also add a config option to always start in readonly (or edit) mode.
I see. I actually was going to suggest you add an option by default, but I thought that was harder than adding a new option to the context menu.
Also, another good idea is to add a checkbox option that reads the first row as a header by default.
Also, another good idea is to add a checkbox option that reads the first row as a header by default.
This is already an option: csv-edit.readOption_hasHeader
There are some still some things I'm not 100% sure about:
Docs: There are also some things to keep in mind even if readonly mod is enabled:
should column/row reordering be allowed? I think this is ok to keep it
Sorry, I don't quite get what you mean. Could you rephrase it?
generally everything that is done before the table is create is done
Sounds fine to me.
changes to the source file from outside the extension are not prevented (only the table is readonly)
You mean, for example, I edited the csv outside VSCode with Notepad++, it wouldn't prevent that? If so, then it is as it should, in my opinion, as long as the read-only view automatically reloads if changes are made to the file, whether the changes are done with VSCode or some other software.
should column/row reordering be allowed? I think this is ok to keep it
Sorry, I don't quite get what you mean. Could you rephrase it?
Currently you can drag'n'drop columns/rows to reorder them (when you click on the headers).
When the file is changed outside of the extension a dialog is displayed where you can decide to reload the file or not.
Ah okay. In that case, in Read-only, column reordering shouldn't be allowed in my opinion.
Think this is finished now and will be shipped in the next update.
I also disabled
Version?
Feature
Add a strictly "viewing" mode, where all the options at the top are hidden. I like to edit my csv on Notepad++, but Excel Viewer sucks because it can't organize the rows by the source row order. Yours can.