-
Notifications
You must be signed in to change notification settings - Fork 91
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
SS4 improvements #138
SS4 improvements #138
Conversation
1fce59e
to
2cf1515
Compare
Allright, I think this is about as far as I personally need it. The email seems to correctly parse $Member.Email now, although I didn't actually research that issue; perhaps because of the Validator fix. I would suggest also formatting the code to PSR-2 and turning array() into []. I can still do this at a later time, if you like. |
dae25eb
to
292eb48
Compare
(I tried real hard to make those template refactor commits cleaner because it's mostly just moved stuff, not so much deleted and added, but it just won't take...) |
@@ -0,0 +1,14 @@ | |||
/* extracted from silverstripe/framework */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this not something that we can reference from silverstripe/framework, rather than copy and pasting it across here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the main thing that jumps out to me from the PR. In regards to your PSR-2 comments, I'm planning to run PSR-2 formatting across all of our modules in the near future (hooking them up to Travis to enforce this).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand the issue, but this code does not appear in a separate .js file anymore. SS4 now bundles nearly all cms js in a single .js file. I tried searching for showOnClickContainer
in the vendor/silverstripe
folder, but it's only to be found in admin/client/dist/js/bundle.js
. I remember reading about this in the upgrade guide:
https://docs.silverstripe.org/en/4/changelogs/4.0.0#js-in-framework
It suggests transpiling source es6 files in our own build process, but I can't find those source files. Perhaps they're not shipped to the packagist release or something? So in that case, since it's only a small piece of .js, I thought I'd just integrate it directly...
("extracted from silverstripe/framework" actually means I got it from the SS3 code; nowadays, it is actually found in silverstripe/admin, so perhaps I should change that comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah okay, that makes sense. It feels like the confirm password field was never intended for the front end. In which case, happy for this to stay until we come up with a better solution. Thanks for all your work on this PR. I'll probably have a quick play with it before merging :)
dfa4bf3
to
906280d
Compare
I can't get the Members List to work... it stays empty. The problem is in MemberProfileViewer's handleList, where Group::get()
->innerJoin('MemberProfilePage_Groups', 'MemberProfilePage_Groups.GroupID = Group.ID')
->where("MemberProfilePage_Groups.MemberProfilePageID = '{$this->parent->ID}'");
// ->relation('Members') on this is still empty According to Do you have any idea? (in the meantime I'm just continuing my app development while not using any Group -- I added a commit for that here, in order to allow listing all members if no Group is selected) |
f36d906
to
ae27af9
Compare
8fd0564
to
aa14962
Compare
(all CMS .js is in a bundle, so this needed to be extracted)
(since they are invariably set that way when editing the Field anyway)
85cc97f
to
d280f65
Compare
d280f65
to
b61a33c
Compare
(also removed broken screenshot links)
b61a33c
to
74f98b7
Compare
|
@JorisDebonnet Looks great, thanks for your work! |
Cool :) |
Work in progress.
New folder src/Pages
I moved the pages into a new src/Page folder, to make the structure make more sense and so that MemberProfilePage and MemberProfilePageController sit together.
Refactored templates
I made the default templates work again by refactoring them into the default way templates are handled in SS4, in those namespaced folders. This is of course a backwards incompatible change, but I guess we have those anyway. It's easy to move from the old to the new template structure.
(note: I have MemberProfilePage_addmembers instead of _add because for some inexplicable reason I couldn't get it to work with just _add)
Fixed the CMS page icon
Fixed the Password fields (front-end)
SS4 no longer has the separate ConfirmedPasswordField.js file; it's all in one bundle now. So I just took that little piece of .js and .css out and placed it in this repository. About the disappearing "New Password" label, I couldn't exactly figure out the source of the problem, but worked around it.
Fixed MemberProfileValidator