Conversation
87a4cad to
2046e8c
Compare
|
|
|
Rebased. Will require adjustments to be able to work with the updated endpoint structure. |
|
This "uri" approach is a nightmare. Backbone (and potentially other frameworks) assume that if the id is known, then the object already exists. I have used the "uri" as id so it always uses the "update" internal method instead of "create" and tries to PROPPATCH instead of MKCOL. I think we'll still need to use the actual internal id field as the backbone id, and the uri is only used for the path. I'll try that approach then. |
|
|
f12b48d to
61b0149
Compare
|
So I finally have a solution, but it required me to write custom model and collections specifically for Webdav. This would make it reusable in the future. See owncloud/core#27119. The frontend now works, you can now:
|
9899c96 to
059007d
Compare
|
This is now ready for review. Note that this core PR is still required to test this: owncloud/core#27119 (make sure to run Everything is squashed into two commits: Please review @felixheidecke @jvillafanez @DeepDiver1975 @VicDeo @IljaN |
|
... and if you're wondering why I used At least we could say this is a POC that could be used for demoing the functionality. |
|
ah of course, unit tests cannot pass until owncloud/core#27119 from core is merged |
There was a problem hiding this comment.
I'm not sure if this.$('.groups-container') is a good idea. This is confusing for me.
If it's for marking the variable as a jquery object, I'd rather use a name to reflect that, for example "this.jqueryGroupsContainer"
There was a problem hiding this comment.
this.$('.groups-container') is a Backbone View shortcut for this.$el.find('.groups-container')
As for this.$groupsContainer the $ sign is a convention that already tells that this attribute is a jQuery object, just like this.$el.
Hope that makes sense.
There was a problem hiding this comment.
Is this variable used? The scope should be limited to this function and it isn't used here.
There was a problem hiding this comment.
forgot to kill it...
There was a problem hiding this comment.
include the _onSelect function?
There was a problem hiding this comment.
actually I'll remove them all because backbone auto-binds when specified in the "events" block
There was a problem hiding this comment.
I guess the function should return true if it's renamed properly
There was a problem hiding this comment.
no, this is a jquery event handler and the return value indicates whether bubbling is needed (or something like this).
Actually we don't need to return because we already call ev.preventDefault(); at the top.
I'll still add add return false;
There was a problem hiding this comment.
I'd rather "oneline" this if it fits. There is only one variable attribute.
There was a problem hiding this comment.
ok. now it has 134 columns 😉
There was a problem hiding this comment.
What is the purpose of these empty headers?
There was a problem hiding this comment.
This header is for the avatar column
There was a problem hiding this comment.
maybe an HTML comment here to make sure these header are in use? Just looking exclusively at the file it seems they can be deleted.
There was a problem hiding this comment.
nah... will only do if I need to retouch this PR or next time I come around this place
There was a problem hiding this comment.
an experienced HTML dev would know that one does not simply remove an empty "th" or "td" because that would mess up the layout 😉
There was a problem hiding this comment.
I guess this "modules.json" file is used in more places, otherwise it would be better to hardcode the modules here.
There was a problem hiding this comment.
The second usage is in the unit tests, that's why I wanted a separate file... I'm still longing for a proper portable way to load JS files for OC apps.
There was a problem hiding this comment.
"customgroups-groups" or "customgroups-group"? Is this intended?
There was a problem hiding this comment.
This is intended, but not specifically for the frontend work... just a "pass-by" fix.
"customgroups-groups" plural is for GroupsCollection as the collection is a list of groups, so "groups".
The next item GroupMemberShipCollection is actually a single group, so it has the type "customgroups-group" singular.
Still, thanks for spotting
There was a problem hiding this comment.
Any reason to remove this? Mainly to confirm this isn't accidental
There was a problem hiding this comment.
The property isn't used at all in this node.
It was a copy-paste from another node I believe so I removed it.
|
I've also seen that the windows prompts aren't translatable... I think that we should make them translatable in order to merge this, so we can change that part at any time. Otherwise we might need to rush to change the implementation if this is merged. |
|
I haven't reviewed the tests yet.... 😓 |
|
When adding new users to custom group there is no autocomplete in the textfield. This will come after this PR or it is a bug here? |
|
When editing a member role, just a click on the pencil change member's role. Feels a bit unexpected, I think it should be a dropdown with the options admin or member. |
You mean the native window.prompt ? We need to replace these anyway... I put these here to save some dev time. They definitely need a better replacement. (separately) |
|
@SergioBertolinSG I've raised them separately:
|
|
Addressed all review comments and squashed the fixes into the last commit. Note that I also renamed the unit tests from CustomGroupsCollection to GroupsCollection now. @jvillafanez another check ? |
Yes. My point is that I don't know how much time we have to change them. If we make their text translatable, we could release the app. It's ugly, nobody likes it, but it's usable. We can improve the app later. (I'm refering to the windows prompts, not the app itself 😄 ) |
|
We definitely shouldn't release the final app with the ugly window prompts. |
Preliminary work for the frontend.
This extends the Makefile significantly and adds the following: