BetterDynAdmin
BetterDynAdmin copied to clipboard
WIP : Repository Refactor/Revamp
This PR is a work in progress, I opened it to start a discussion before going further
My initial goal was to make a new page which would serve as a cross repository explorer, with visual editing features and full ajax queries to be quicker.
To achieve that, I needed to leverage part of the repo's page methods (display as tab, tree) and ended refactoring it quite a lot, not only the "backend part" but also the repo page itsef : display as tab, edit inline, link to child item.
I'm now at a state with a almost full iso-functionnal repository page, with a new "engine" under the hood, and also fixed some bugs / inconsistencies in the UI/UX.
In short, what's new:
- New "MVC" model that uses classes to formalize models:
- Using objects makes it clearer, less arrays everywhere that store bits of data.
- Repository :
- holds the whole repo definition in memory for when using multiple repositories.
- ItemDescriptor :
- contains self and parent properties
- xmlDef is parsed on demand and stored for further use
- PropertyDescriptor :
- stores default value, item type of property if required.
- RepositoryItem : model of a parsed xml result
- PropertyValue : each value, default or actual, with its flags parsed from the xml (rdonly, etc )
- Result as tab:
- Fully compatible and agnostic between itemtree and standard result (+ repo explorer when it's done)
- properties sorted alphabetically
- load sub item :
- now uses an ajax call, saves the time to reload the page & BDA - several seconds.
- If the item is already on the page, scroll to it. (like for item tree)
- Now available for multi items (lists & maps)
- more constistent collapse expand of long properties:
- added collapse all button
- per cell collapse/expand
- inline edition more consistent across fields types (not finished yet)
- TODO : reload item view, delete view
- TODO:
- change the item tree generation to use the same model for each type of visualization, instead of reloading the tree each time.
- add help/hints overlays.
- performance testing
also : I'm considering adding Q as a new library to handle Promises, there are a lot of nested callbacks, it has become quite unreadable sometimes.
Outch, That's a lot of stuff !
I will need some time to digest since I don't recognize a lot the code anymore ;)
Take your time. I don't need to merge right now, I can continue to work on the branch.
Added a lot of fixes.
Plus : reload an item, copy item xml from tab, better inline edit, close tab.
I'm globally satisfied with the changes, so it's ready to merge when you are.
Hi @jc7447
Did you get a chance to look at it? I would like to merge this and work on some other stuff. We also should discuss the next release date, there have been quite some changes since april.
Hi,
I'm time short those days but I will try to review this next week, once it's done I will release version 2.2
No pressure ;)
Le 19 nov. 2017 11:42 AM, "Jean-Charles Manoury" [email protected] a écrit :
Hi,
I'm time short those days but I will try to review this next week, once it's done I will release version 2.2
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jc7447/BetterDynAdmin/pull/132#issuecomment-345507287, or mute the thread https://github.com/notifications/unsubscribe-auth/AH7cnK7PUbuK02yAsz89D5JLgKRyUJodks5s4AYYgaJpZM4QMwoV .
TODO
-
[x] perfs
- [x] create edition form on click, not on display (almost 30% of time spent here)
-
[x] tooltip/help - I was thinking the same
-
[x] dash - i'm going to remove the new tab for now, as the feature it not quite finished (the repo refactor took over)
-
[x] speedbar button
-
[x] read only vs default values
-
[ ] exception handling
-
[x] anchor links : i used a new method from html5 to scrollTo, it has weird behavior sometimes, depending on the browser. One good thing is that is also scrolls left/right. I'll check if there are more options to tune it, and also maybe flash the item that is scrolled to (it's confusing as hell when there are a lot of priceInfo for example).
just rebased from dev to get the latest refactors (some about perfs)
perfs : looks like the culprit is buildResultTable, it is linear with the number of items, about 100ms / item
I'm replacing all the dom manipulation by string concatenation, it's around 5 times faster.
Hi @jc7447
I finally got time to fix the last bugs.
Perfs are much better (even if slower than before, we are doing more calculations) I tried to make it smoother for the user, by adding a loading bar and trying to defer some calculations Added a "speedbarManager" to handle the scroll events, for perfs.