-
Notifications
You must be signed in to change notification settings - Fork 40
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
Remove "Who's new" block from core #147
Comments
This issue would be great to get handled before layouts land in #86. Currently we have to port the block settings for this block, but if it were a view, there would be no settings at all and it would simply be part of the view config. |
I'm trying to tackle this, but it's my first use of: Github (outside the issue queue), Backdrop, and the changes Backdrop ported from D8 (e.g. CMI)... I've successfully forked the Backdrop repository to my own, and cloned it onto my server to get a working sandbox site. I've then created a view that mimics the core "Who's New" block, but have two problems:
|
Hi @BWPanda! Great to have you working on this issue. :) The current filter will probably be okay. No one is going to be creating new accounts before the Unix epoch. ;) Most likely you could skip the "filter" entirely, and just include the "sort", since I believe it'd be preferable to show even "old" users as "new" rather than an empty block if there were no new users (maybe not though, I suppose it's a matter of opinion). I'm fine with it either way. So, to answer your question.
There are two things you need to do. One is easy and the other quite difficult. First thing, just copy the configured JSON file file from your files/config_*/active/ directory, probably called "views.view.whos_new.json" (or similar) to the /core/module/user/config directory. Congrats! Now your new view will be installed automatically on new installs of Backdrop. Unfortunately, then comes the hard part, which is providing an upgrade path for this block. If the block was enabled in D7, it should be enabled upon upgrading to Backdrop 1.0 via update.php. This means that you'll need to make a user_update_10*() function in user.install, which *recreates the view as an array then writes it to a config file. Then it will need to update the Let's start with just the first part and file a PR from there. I'll followup up feedback on what you have so far, then we can work on the upgrade path, which has a number of caveats. |
Great, thanks for the assistance! Just posted a question in the meta issue which I'd like your thoughts on before proceeding: #151 (comment) |
Ok, so the view is ready to commit, but |
So if you have accidentally committed your settings.php file, the easiest thing to do is replace it with a fresh copy, then commit the change (with settings.php back to the default) with Generally speaking, you can prevent this problem by avoiding the .gitignore can't ignore a file that's under version control (apparently), so you just have to avoid using |
Nope, all good. Was just checking before I made any commits. I learnt git using Drupal, so only ever really committed everything in the directory (e.g. module, theme...) Didn't think to just not add what I didn't want :) |
For the record, regarding my comment above for the 'Last access' filter, Backdrop does have the 'Is empty (NULL)' filter, but it only applies to fields that can be NULL (as set in the DB). Users.access cannot be NULL, hence you can't use the 'Is empty (NULL)' filter. |
@quicksketch In looking at other default views to see how/why |
Views module is only providing the current ones because that's how they came over from the D7 port.
The views should be moved to their respective modules. :) |
Hi, as you may have noticed, I started the conversion of the new content block. I noticed your comments in last weeks Hangout re the upgrade path missing. I've been finishing my dissertation; its gone off to be crucified now, so I'm free and would like to get back on this. |
@docwilmot I added some docs to the meta issue about how to approach upgrade paths. #151 I hope that helps :) |
Forgot to remove the hard-coded block... |
Considering this discussion about dropping blocks such as "Who's Online", I'm wondering if this "Who's New" block is useful or should it be dropped too? (I've personally never used it...) |
As per #148, I think we should remove this block from core. (This is not a feature that benefits the 80%.) At this point, we're running out of time to port things to views, and even though it's pretty "easy" to build the view, the upgrade path complicates things a little. Our time would be better spent on things that have a bigger impact on our users than these two blocks :) |
I posted a response over in #148 (comment) as well. The PR to remove this block at backdrop/backdrop#591 looks good to go to me. |
Relevant drupal.org issue: https://drupal.org/node/2020395
The text was updated successfully, but these errors were encountered: