-
Notifications
You must be signed in to change notification settings - Fork 8
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
Added support for legacy Imulus.TableEditor formatted data #29
base: v13/main
Are you sure you want to change the base?
Conversation
LegacyImulusTableEditorExampleData.txt Sure! see attached |
Thanks 👍 Looking at the legacy format, I suspect we might have based ours on Imulus.TableEditor. Anyways - I suppose we can use the same parsing logic for either format, as looking at only the |
I wasn't sure if there was a specific reason that the empty rows/columns were in the JSON, so I figured I wouldn't mess with the existing functionality, just add alternate functionality in case "rows" didn't exist. |
@abjerner Do you need me to do anything else in the code for this? |
@hfloyd no, I think the PR is fine. I just haven't had the time to look further into it yet 😦 Like mentioned in my previous comment, there may be some room for improvement so the parsing logic is the same for both the old and the new format. Whether you want to look a bit into that is up to you - otherwise I'll do so when I get around to reviewing your PR 😉 |
Ok, I just wanted to make sure you weren't waiting on anything from me. 🙂 |
I removed the "checking" of which data format might be in use, and just have the "maxCell" value used for the index, and it seems to work fine for old and new data now. |
Hi @hfloyd and again thanks for your contributions 👍 I had hoped to look at your PR sooner, but other work have ended up getting in the way. Following your last commit, I had another look, and I'm most likely going to reject this PR. Not because it isn't good, but because our own parsing logic was a bit of a mess. By starting over, I've been able to improve the code a lot - e.g. by avoiding LINQ and unnecessary iterations, and hopefully also making the code a bit cleaner. I hope that makes sense 😉 It's getting late here, so I'm stopping for today. I haven't committed anything yet, but I'll try to find some time to wrap this up tomorrow. I'll do some more testing, and hopefully I will be able to push a new release then 😎 |
Hi @abjerner! Ok, cool. I just needed something functional for my current project, so I'm using my own build right now (in other words - no big rush needed). Incidentally, I figured out that though the legacy data format allowed the data to appear in the UI, and you could click on an existing cell to edit it, the add/remove columns and rows functionality wasn't working (I guess that's what those collections of "{}" were providing markers for), so I have begun updating the legacy data with some simple "find/replace" logic to bring it more in line with the new format. |
@hfloyd you can see the updated C# code in the The updated implementation only looks at the If the Angular implementation in the backoffice still relies on |
@hfloyd you can see the C# fix in this commit: e5f1681 I also had a quick look at the Angular part. It seems that if Could you test whether this works with your data? Ideally we shouldn't need the On another note, I can see that the example data you posted earlier has 25 columns, but I can see that our |
Thanks, @abjerner, for the updates. I pulled, built a local NuGet package and installed it, but now my site won't build with weird errors ("The type or namespace name 'Tables' does not exist in the namespace 'Limbo.Umbraco' (are you missing an assembly reference?)") Once I figure out what happened there, maybe I can tell you if it works 😝 Regarding the column limits... I'm sure it IS a crappy user experience... but this is a financial firm, and they are using the table data sometimes to render the tables, and sometimes as a datasource for charts. I'm sure there is a better architecture for these use-cases, but I'd need to discuss it, implement it, and then transition all the current data... so for the time being (that is, trying to launch a version-updated site), I will just have to deal with it. Ideally the property editor would allow the data, regardless of usability... perhaps showing a warning message if it exceeds a certain size? I don't know. I noticed even on smaller tables, the width of the screen will cause horizontal scrolling, and if you have a table with 12 columns, but they have long un-breaking content (like filenames or who knows what), it will still make sideways scrolling necessary. I did notice that if you have a bunch of columns, the little trash can icons often don't align properly with the associated column, which could also get problematic, from a user perspective. There are ways to solve for this (perhaps showing light grey column numbers with each trash can and each first row column of actual content, so even if they aren't aligning, they can be associated?) Looking at the Imulus v7 one, its UI is a little different - with a more "excel-like" layout: (from: https://github.com/xorcery/TableEditor?tab=readme-ov-file#umbraco-7-tableeditor) I'm sure horizontal scrolling was still an issue, but the row/column outlines might make it easier to keep one's place. |
Ah, the issue was that this is targeting v13/.Net 8 and my site is v10/.Net 6. I changed it to .Net6, and updated the project file with The UI now works whether the underlying data is in the new or old format! ✔ |
|
FYI - I integrated your updates into v1 for pre-Umbraco-13 usage. #34 |
Resolves #28