Move configuration to its own page

Created on 17 June 2023, about 1 year ago
Updated 20 June 2024, 8 days ago

Problem/Motivation

Currently, the two configurable fields for the module ("Untranslated message when a user is not logged in ..." and "Untranslated message when a user is already logged in ...") are a little hidden at the bottom of the existing "Account settings" (/admin/config/people/accounts) page.

I forget how I discovered them by chance. Maybe looking at the code, or when visiting "Account settings"? But I didn't even realize they existed until then.

Steps to reproduce

Realize there are settings for the module by chance.

Proposed resolution

Move the settings to its own page, perhaps under /admin/config/people/accounts/uli-custom-workflow?

This will make it more easily discoverable, both by adding it to the admin menu, but also providing a "Configure" link under the module on the Extend page (/admin/modules).

Remaining tasks

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Needs work

Version

1.0

Component

User interface

Created by

πŸ‡©πŸ‡°Denmark ressa Copenhagen

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @ressa
  • First commit to issue fork.
  • Merge request !3Move configuration to its own page β†’ (Open) created by hmendes
  • Status changed to Needs review 9 days ago
  • πŸ‡§πŸ‡·Brazil hmendes

    Created a config page for both messages.
    I saw that there are a couple files related to phpunit and docker, honestly, idk if they're being used.. if my first time using this module and I've also being away from the community for a few months, so idk if smth changed and now those files are required...

    Anyway, let me know if there smth else that should be changed, or if the code I changed impacted smth else bc of those extra configurations.

  • Status changed to Needs work 8 days ago
  • πŸ‡¨πŸ‡¦Canada alberto56

    Hi @hmendes

    files related to phpunit and docker

    Although this is not something that's standard in Drupal projects, I use those as part of automated testing, here is how it works: on the github mirror of this project at https://github.com/dcycle/uli_custom_workflow, you will see a green badge that says "Passed", this means CircleCi tests are passing at https://app.circleci.com/pipelines/github/dcycle/uli_custom_workflow?bra...

    In turn CircleCI tests are defined at https://github.com/dcycle/uli_custom_workflow/blob/1.x/.circleci/config.yml which basically says tests require Docker to be run and can be run using ./scripts/ci.sh

    To run all tests locally without any other dependency, if you have Docker installed, you can run ./scripts/ci.sh on your machine, which uses Docker to run all tests including PHPUnit tests.

    Need to merge 1.x into your MR branch and fix tests

    The branch as it is, is based on version of 1.x which is not completely up-to-date. There are some changes to 1.x branch, including a change I just made a few minutes ago, which should be merged into the MR branch 3367414/3367414-move-configuration-to.

    Once that is done, you can run tests locally by installing Docker and running ./scripts/ci.sh

    This will yield some errors such as:

    FILE: /code/src/Form/UliCustomWorkflowSettingsForm.php
    --------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------------
     6 | ERROR | [x] Use statements should be sorted alphabetically. The first
       |       |     wrong one is Drupal\Core\Form\ConfigFormBase.
    --------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------
    
    
    FILE: /code/src/Controller/UliUserController.php
    ----------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ----------------------------------------------------------------------
     5 | WARNING | [x] Unused use statement
    ----------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------
    

    Once ./scripts/ci.sh works locally, I will be able to review and test the code.

  • πŸ‡§πŸ‡·Brazil hmendes

    Oh, ok, got it, thanks.
    I fixed the issues related to phpcs/lint and phpunit, but I couldn't run the 'deploy' and 'test-running-environment.sh' scripts due to some issues in my local env, but I won't have time to fix it now, so if anyone wants to check it out, feel free to do so.

Production build 0.69.0 2024