This module provides developer-configurable labels that can be printed in any twig template. Admin users can edit the text that will be output wherever the label appears without having advanced permissions like 'administer themes'.
We often find ourselves providing custom blocks or theme settings in order to allow site editors and administrators a simple way to edit text on sites. In some cases, this is a great solution. In other cases, it is overkill when a simple, editable text-label would suffice.
This functionality is similar to using tokens, except these labels are intended specifically to be used in twig templates as simple text labels where tokens are not.
Project Page: https://www.drupal.org/sandbox/gradywring/2796663
git clone --branch 8.x-1.x https://git.drupal.org/sandbox/gradywring/2796663.git
Comments
Comment #2
PA robot CreditAttribution: PA robot commentedFixed the git clone URL in the issue summary for non-maintainer users.
We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)
Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #3
Graber CreditAttribution: Graber as a volunteer commentedHi there,
Reviewed your module, my general remark is that such data is usually bound to a specific theme and therefore such labels should reside in theme settings (with each variable name hardcoded) not in a module, defining labels like this can lead to unexpected errors caused with code-config inconsistencies.
Template results below:
Automated Review
No automated test cases were found.
Manual Review
The starred items (*) are fairly big issues and warrant going back to Needs Work. Items marked with a plus sign (+) are important and should be addressed before a stable project release. The rest of the comments in the code walkthrough are recommendations.
If added, please don't remove the security tag, we keep that for statistics and to show examples of security problems.
This review uses the Project Application Review Template.
Comment #4
gradywring CreditAttribution: gradywring commentedHey, thanks for the review. Great recommendations. I will make those changes right away.
Did you use a tool to find the standards compliance issues? If so, which one?
Comment #5
Graber CreditAttribution: Graber as a volunteer commentedYou're welcome :)
I use phpcs with latest coder standards (https://www.drupal.org/project/coder). Not much of it really (mainly variable naming conventions), I don't think anyone will block a project because of that..
Comment #6
gradywring CreditAttribution: gradywring commentedCool, thanks. I'm going to add some configuration for each label to limit each label's scope to specific themes and hooks. Your note about this type of thing typically being a theme setting was not ignored and I completely agree. The main reason for this approach is to be able to give lower-level site editors access to these string labels without full-blown 'administer themes' permission.
Comment #7
gradywring CreditAttribution: gradywring commentedFixed all issues and recommendations:
I also added the ability to edit labels from the admin.
Comment #8
gradywring CreditAttribution: gradywring commentedComment #9
gradywring CreditAttribution: gradywring commentedBumping because it has been a month since setting to Needs Review.
Comment #10
meickolHi @gradywring,
Recommendations:
please check the git clone url, should be something like :
Automated Review
And check this pareview please, you have some stuffs to fix and add that link to your project applications helps.
https://pareview.sh/node/1287
Manual Review
Everything else look good for me.
please help me reviewing my project applications, thanks.
https://www.drupal.org/node/2849311
Comment #11
PA robot CreditAttribution: PA robot commentedThere are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpsgitdrupalorgsandboxgradywring2796663git
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #12
PA robot CreditAttribution: PA robot commentedClosing due to lack of activity. If you are still working on this application, you should fix all known problems and then set the status to "Needs review". (See also the project application workflow).
I'm a robot and this is an automated message from Project Applications Scraper.