Comments

blesss’s picture

We start to port into Drupal 8.

couturier’s picture

Yes, interested in this. It is essential for other important modules to function, like SEO Checklist. Wish I could help, but I'm not a programmer. I think other users going into Drupal 8 would benefit, though, if someone has the time.

blesss’s picture

Our team InternetDevels made the first patch which implements menu, forms, theme function, hook_init.

blesss’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 3: checklistapi-drupal8_importing_menu-2142903-3.patch, failed testing.

The last submitted patch, 3: checklistapi-drupal8_importing_menu-2142903-3.patch, failed testing.

traviscarden’s picture

Thanks for the jumpstart, @blesss. At least the following issues remain:

  • Checklist forms have two "Save" buttons, and neither one works.
  • "Clear saved progress" links don't work.
  • "Clear" and "Compact mode" page callbacks shouldn't show in the menu but do.
  • Progress bars are broken.
  • "Hide/Show item descriptions" links don't work.
  • Automated tests need to be upgraded.
  • The Checklists report table needs to be made mobile friendly.
  • The checklist form needs to be made mobile friendly.
mgifford’s picture

Excellent to see this. Looks like it's time for a new branch.

traviscarden’s picture

Version: 7.x-1.x-dev » 8.x-1.x-dev

Quite so, @mgifford!

valderama’s picture

Status: Needs work » Needs review
StatusFileSize
new78.69 KB

I continued the work on the port. And solved most issues:

  • Checklist forms have two "Save" buttons, and neither one works.
  • "Clear saved progress" links don't work.
  • "Clear" and "Compact mode" page callbacks shouldn't show in the menu but do.
  • Progress bars are broken.
  • "Hide/Show item descriptions" links don't work.
  • Automated tests need to be upgraded.
  • The Checklists report table needs to be made mobile friendly.
  • The checklist form needs to be made mobile friendly.

Would be nice to get proper attribution, once this patch gets committed.

Status: Needs review » Needs work

The last submitted patch, 10: checklistapi-drupal8-2142903-10.patch, failed testing.

traviscarden’s picture

Thanks, @valderama. I'll look at this as soon as I'm able. We'll find a way to properly distribute commit attribution in the end. :)

anavarre’s picture

FYI https://drupal.org/project/drupalmoduleupgrader should soon start to become usable and could help with the port to D8.

traviscarden’s picture

I had just a few minutes over the weekend to apply the patch in #10 for a quick test, and it didn't work for me. It didn't create a menu item, and it caused a route subscriber fatal error. Also, could we run Coder Sniffer on patches before submitting them? That will ensure that they're clean and free from obvious errors, which will make it easier to review and move them forward.

valderama’s picture

Status: Needs work » Needs review
StatusFileSize
new36.67 KB

The module works fine for me using Drupal 8 dev. Which core version are you using?

The only visible menu item is admin/reports/checklistapi which is defined in checklistapi_menu_link_defaults(). Is this the menu item you are referring to?

I fixed the formatting errors that phpcs gave me and attached a new patch.

Status: Needs review » Needs work

The last submitted patch, 15: checklistapi-drupal8-2142903-15.patch, failed testing.

valderama’s picture

Status: Needs work » Needs review
StatusFileSize
new48.74 KB

Sorry, the patch #15 was a bit erroneous. It contained old files also due to recent changes in core it did not work correctly.

Just recently the good old theme() function was declared private by renaming it to _theme(). To make this patch work for now I still use the theme function. However these parts should be rebuilt to make use of render arrays instead of calling _theme().

So, here is a new patch.

Status: Needs review » Needs work

The last submitted patch, 17: checklistapi-drupal8-2142903-17.patch, failed testing.

traviscarden’s picture

Thanks, @valderama. This is shaping up nicely. There are still a few bugs and a fair amount of cleanup needed, but I'm working my way through it.

traviscarden’s picture

StatusFileSize
new46.33 KB
new18.75 KB

All right; lot's of progress! At least the following issues remain after the attached patch:

  • Automated tests need to be upgraded.
  • The _theme() invocations need to be reimplemented according to the new method.
  • Checklist API example module doesn't have a menu item.
  • The "Clear saved progress" link on checklist form is butted right up against "Save" button.
  • I'd like the checklist form to be made mobile friendly--if that's even feasible.
  • I've noticed a fair number of typos and copy/paste cruft, and I haven't gotten through all of it yet.

We're getting there! Everyone's continued help is much appreciated. @valderama, since you've done the lion's share of the creative work on this, my intention right now is to attribute the commit to you when it goes in. Edit: Since I ended up doing the greater part of the work on this one I went ahead and committed the code normally and credited contributions in the commit message like they do in core. I'll gladly attribute smaller follow-up contributions that don't require so much shepherding, like unit tests or bug fixes.

blesss’s picture

StatusFileSize
new46.77 KB
new3.94 KB

I continued the work on the port. And solved issues:

  • Automated tests need to be upgraded.
  • The _theme() invocations need to be reimplemented according to the new method.
  • Checklist API example module doesn't have a menu item.
  • The "Clear saved progress" link on checklist form is butted right up against "Save" button.
  • I'd like the checklist form to be made mobile friendly--if that's even feasible.
  • I've noticed a fair number of typos and copy/paste cruft, and I haven't gotten through all of it yet.
traviscarden’s picture

Issue summary: View changes
StatusFileSize
new50.64 KB
new15.63 KB

Thanks, @blesss. I'm taking a little different approach on those two issues. Here's an updated patch with those and a few other fixes. Interdiff from my last patch. I'm movign the to-do list to the issue summary.

ben finklea’s picture

I love seeing the progress! Makes me wish I knew how to code...

mgifford’s picture

It's never to late to learn.... :)

EDIT: Also useful to leverage SimplyTest.me to evaluate this patch quickly in context. No coding knowledge required.

traviscarden’s picture

Issue summary: View changes
StatusFileSize
new51.36 KB
new5.07 KB

Here's a new patch that fixes a few issues:

  • An upstream RouteCollection API change that caused a fatal error.
  • The checklist progress bar not showing "0%" when there's no progress.
  • A few low-level coding issues.
traviscarden’s picture

Re @mgifford: Good point! You don't have to be a programmer to test the current progress and give valuable feedback! Here's a Simplytest.me link for the current patch, @Ben Finklea. Just follow this to spin up a current Drupal 8 installation in the cloud. It will guide you through installation and logging in. Go to the "Extend" page to install the Checklist API and Checklist API example modules, and then you can go to Reports > Checklists and try it out!

ben finklea’s picture

Wow. OK. I stand corrected. I can help.

Kudos, Travis, I've never seen such a succinct description of how to test something in Drupal. This was really easy and makes me wonder why this isn't more obvious and made easier for people like me who are very involved in Drupal but are not able (willing/have the time) to php stuff. You're probably going to point me to some deep arcane location on D.o that explains all this in detail that is linked to from the home page or something...

Here's my report:

  • No fatal error.
  • The checklist progress bar shows 0% when nothing is checked.
  • I don't see any low-level coding issues.
  • After 8 years in Drupal, I am 44% of the way up the learning curve.
traviscarden’s picture

"You're probably going to point me to some deep arcane location on D.o that explains all this in detail that is linked to from the home page or something..."

Ha! No, this one isn't as obvious as it should be. Install the Dreditor extension in your web browse of choice, and it will add (among other things) a Simplytest.me button to every patch on Drupal.org like the link I gave you above. It would be nice if the functionality was on Drupal.org by default, but for now it belongs to the deep magic of a select few Drupal alchemists... into whose society you've just been inducted. ;-)

anavarre’s picture

Just tried the patch and it works nicely here as well. Only thing I was expecting to see is a real-time progress bar as I was checking more skills with the Example checklist.

Isn't there something wrong with the paths? I see the main Checklist API page at admin/reports/checklistapi but when you click on the Checklist API example link it brings you to admin/config/development/checklistapi-example - Wouldn't that be admin/reports/checklistapi/checklistapi-example instead?

traviscarden’s picture

Issue summary: View changes
StatusFileSize
new92.85 KB
new60.95 KB

Thanks for the feedback @anavarre. I'll add real-time updating of the progress bar to the to-do list. Paths are arbitary. Implementing modules can make them whatever they want.

Here's a new patch.

  • I fixed the missing checklist description at the top of checklist forms. (Note to contributors: Please be careful not to remove code from the codebase in your patches without saying anything.)
  • I added some PHPUnit test coverage with a run-tests.sh script to facilitate running them.
  • I upgraded the old Simpletest tests, but Drupal isn't finding them at the moment. If anyone knows why, I'd sure appreciate that info. Update: Drupal is finding them now--they're just failing. :P
  • I renamed checklistapi_example module to checklistapiexample.

The list of remaining tasks has been updated in the issue summary. For anyone that wants to contribute, I would appreciate any progress against that list or code review of the patch so far. Thanks!

traviscarden’s picture

Issue summary: View changes
traviscarden’s picture

Issue summary: View changes
Status: Needs work » Needs review
StatusFileSize
new93.54 KB
new3.89 KB

More progress:

  • I moved static menu links to checklistapi.menu_links.yml per https://drupal.org/node/2228089.
  • I upgraded the automated tests. (w00t! Let's see if the d.o test runner turns this green now!)
  • I replaced the example checklist's missing menu item.
traviscarden’s picture

Issue summary: View changes
StatusFileSize
new95.6 KB
new8.31 KB

All right! This one should bring us to functional completion.

  • JavaScript to warn before leaving the form with unsaved changes works again.
  • Added dynamic progress bar updating. (Thanks for the suggestion, @anavarre. I added it to the 7.x branch, too.)
  • Confirmed that checklist pages don't get cached when page caching is enabled.
  • Updated ChecklistapiController::setCompactMode() to redirect to the checklist using its route name. (The "fix" was a little kludgy. If anyone knows a better way, I'd love to know about it!)
  • Updated language in code comments referring to system variables for the fact that configuration is now used.
  • Removed use of config(). in checklistapi_compact_mode().

I would love it if anybody can give the patch a general review. Then I'm ready to commit this and cut a dev release!

I realized that the testbot isn't going to turn this patch green until the 8.x-1.x branch is passing tests--which it won't be until this patch gets committed. Chicken and egg. Oh well. :)

  • Commit 7c1442c on 8.x-1.x by TravisCarden:
    Issue #2142903 by TravisCarden, valderama, blesss: Port to Drupal 8.
    

The last submitted patch, 32: checklistapi-drupal8-2142903-32.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 33: checklistapi-drupal8-2142903-33.patch, failed testing.

traviscarden’s picture

Issue summary: View changes
Status: Needs work » Fixed

Fixed! Functionality is complete. Automated tests pass. There's a dev release on the project page. Thanks, everyone, for all your help!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.