Sub-issue for meta issue #1880976: [meta] Port examples (including submodules) to D9.4+

Problem/Motivation

D8 all the things!

Proposed resolution

Start with D7 version and figure out how to port ;)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

vijaycs85’s picture

Initial patch...

Tested locally and working like D7.

Mile23’s picture

Status: Needs review » Needs work

Thanks, vijaycs85. Looks like a great start.

  1. +++ b/js_example/js_example.info.yml
    @@ -0,0 +1,5 @@
    +name: 'JS Example'
    

    Lets rename this thing to be 'JavaScript Example.'

  2. +++ b/js_example/js_example.module
    @@ -0,0 +1,25 @@
    +/**
    + * @file
    + * Examples showing how to use some of the new JavaScript features in Drupal 7.
    + */
    +
    +/**
    + * @defgroup js_example Example: JavaScript
    + * @ingroup examples
    + * @{
    + * Examples using Drupal 7's built-in JavaScript.
    + */
    

    A few references to Drupal 7.

  3. +++ b/js_example/js_example.routing.yml
    @@ -0,0 +1,15 @@
    +  path: '/js_example/weights'
    ...
    +  path: '/js_example/accordion'
    

    Let's follow the other examples and use a path of /examples/js_example/whatever.

    Also, we need a route and controller for /examples/js_example, with a little bit of explanation of what's going on.

Overall it would be good to have more inline comments and docblocks explaining the code.

Thanks.

vijaycs85’s picture

Status: Needs work » Needs review
FileSize
10.43 KB
1.73 KB

Thanks for the review @Mile23. Here is the updates.

#2.1 - FIXED
#2.2 - FIXED
#2.3 - FIXED
#2.3.1 - NOT-FIXED: "Also, we need a route and controller for /examples/js_example, with a little bit of explanation of what's going on." - Not sure what really we need to have on that page.
#2.3.2 - NOT-FIXED: "inline comments and docblocks explaining the code" - Again not sure what needs to be covered.

Mile23’s picture

The last submitted patch, 3: 2102665-js_example-convert-d8-3.patch, failed testing.

Mile23’s picture

Mile23’s picture

FileSize
6.6 KB
13.56 KB

Added info page, fixed some routing stuff, added menu items, expanded some inline comments, added a few @ingroups, now tests for the existence of paths for some regression value.

Mile23’s picture

Status: Needs review » Fixed
vijaycs85’s picture

yay!!! thank you too @Mile23

Status: Fixed » Closed (fixed)

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