Closed bjarnef closed 1 year ago
In my defense a lot of this code was started all the way back for Umbraco 7 😁
I agree that this should be
I noticed the packkage by default install XLSX, JSON and CSV providers for Import and Export. Not sure if it is possible to customize these, e.g. to add an XML provider or some other weird format? Should each provider be splitted into separate packages, so each provider could be added?
I haven't seen XML requested before. So if there isn't a common format used for this, it's probably something that should be in a separate package (you can write your own exporters and importers).
In theory the package could also ship with an XML exporter and importer where you'd get some additional options to indicate the format, so this is a bigger task, and not something I'm actively looking into. But I have considered this approach for the JSON importer as right now it's using my own internal format.
Makes sense :)
Another thing I noticed is the file upload in import of redirects https://github.com/skybrud/Skybrud.Umbraco.Redirects.Import/blob/1c82824ea892c0aa7ecbad87e7ecc8d72a7ec6c7/src/Skybrud.Umbraco.Redirects.Import/wwwroot/Views/Editors/File.html#L13-L22
Any reason this couldn't use <umb-file-dropzone>
component?
https://github.com/umbraco/Umbraco-CMS/blob/ced8e0582d69579d6af3c4bd05dd4844aa2dabb2/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/layouts/grid/grid.html#L37-L46
I can't remember for sure about the drop zone. I think that I may have needed some more control of ngf-select
, so I used the directive directly instead of via Umbraco's drop zone directive.
Like I mentioned earlier, a lot of the code was also started out for Umbraco 7, and then there was a long time when I didn't really have the time to work on the package. So it's also possible that I made a few shortcuts when updating the code base to Umbraco 10.
Looks good 👍
I noticed the import and export actions use
<a>
element, but unless linking to something,<button>
element is better when in comes to accessibility, although anchor can haverole="buttton"
.