feat(utility): add PrettyName utility to generate human-readable names from slugs #4
Merged
Copilot
merged 10 commits from 2026-03-06 08:14:22 +00:00
copilot/generate-pretty-names into main
No Reviewers
Labels
Clear labels
automation
breaking-change
bug
build
ci-cd
code-quality
config
css
dependencies
deploy-failure
docker
documentation
dolibarr
enhancement
generic
good first issue
health-check
health: excellent
health: fair
health: good
health: poor
help wanted
html
javascript
joomla
major-release
minor-release
mokostandards
needs-review
needs-testing
patch-release
pending: testing
php
priority: critical
priority: critical
priority: high
priority: high
priority: low
priority: low
priority: medium
priority: medium
push-failure
python
regression
release-candidate
security
size/l
size/m
size/s
size/xl
size/xs
size/xxl
standards-drift
standards-update
standards-violation
status: blocked
status: in-progress
status: needs-review
status: on-hold
status: pending
status: wontfix
sync-failure
sync-report
template-validation-failure
test-failure
testing
tests
type: bug
type: chore
type: enhancement
type: feature
type: refactor
type: release
type: test
type: version
typescript
version
version-branch
version-drift
work-in-progress
bug
chore
documentation
enhancement
feature
pending: dependency
pending: deployment
pending: design
pending: documentation
pending: feedback
pending: review
pending: testing
priority: critical
priority: high
priority: low
priority: medium
refactor
roadmap
scope: client
scope: dolibarr
scope: infrastructure
scope: joomla
scope: waas
security
status: blocked
status: duplicate
status: in-progress
status: needs-review
status: wontfix
Automated processes or scripts
Breaking API or functionality change
Something is broken
Build system changes
CI/CD pipeline changes
Code standards and cleanup
Configuration file changes
CSS/styling changes
Dependency updates
Automated deploy failure tracking
Docker configuration changes
Documentation changes
Dolibarr module or extension
New feature or improvement
Generic project or library
Good for newcomers
Repository health check results
Health score 90-100
Health score 50-69
Health score 70-89
Health score below 50
Extra attention needed
HTML template changes
JavaScript code changes
Joomla extension or component
Major version release (breaking changes)
Minor version release (XX.YY.00)
MokoStandards compliance
Awaiting code review
Requires manual or automated testing
Patch version release (XX.YY.ZZ)
Closed without testing proof - needs verification before closing
PHP code changes
Must fix before any release
Critical priority, must be addressed immediately
High priority
Should fix soon
Low priority
Nice to have
Medium priority
Fix when convenient
File push failure requiring attention
Python code changes
Regression from a previous working state
Release candidate build
Security-related changes
Large change (101-300 lines)
Medium change (31-100 lines)
Small change (11-30 lines)
Extra large change (301-1000 lines)
Extra small change (1-10 lines)
Extremely large change (1000+ lines)
Repository drifted from MokoStandards
MokoStandards sync update
Standards compliance failure
Blocked by another issue or dependency
Currently being worked on
Awaiting code review
Temporarily on hold
Pending action or decision
This will not be worked on
Bulk sync failure requiring attention
Bulk sync run report
Template workflow validation failure
Automated test failure
Manual testing tasks
Test suite changes
Something isn't working
Maintenance tasks
Enhancement to existing feature
New feature or request
Code refactoring
Release preparation or tracking
Test suite additions or changes
Version-related change
TypeScript code changes
Version bump or release
Version branch related
Version mismatch detected
Work in progress, not ready for merge
Something is not working
Maintenance and housekeeping
Documentation improvements
Improvement to existing functionality
New feature or request
Blocked by another issue or external dependency
Tested and approved, awaiting deployment to production
Needs UI/UX or architecture design before implementation
Feature works, needs documentation/wiki update
Awaiting feedback or decision from stakeholder
Implementation complete, awaiting code review
Feature implemented but not yet tested
Must fix immediately
Should fix soon
Nice to have
Fix when convenient
Code restructuring without behavior change
Planned feature or enhancement tracked on the roadmap
Client-specific work
Dolibarr modules and customizations
Server, CI, backups, monitoring
Joomla templates and extensions
MokoWaaS platform
Security vulnerability or hardening
Waiting on external dependency
Duplicate of another issue
Being worked on
Ready for review
Will not be addressed
No labels
Milestone
No items
No Milestone
Assignees
jmiller (Jonathan Miller)
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: MokoConsulting/MokoJoomTOS#4
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "copilot/generate-pretty-names"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
makecommands (replace withphp -l), remove JavaScript section, fix linksmakecommands, fix subject line format, fix linksonAfterInitialise→onAfterRoutein Technical Details, addUtility/directory to project structure, remove duplicate inline Changelog section, remove stale reference to non-existentscripts/directoryrebuild_indexes.pyreference, make it a proper MokoJoomTOS root navigation index💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.
Pull request overview
This PR introduces a small PHP utility to derive human-readable labels from menu slugs (used in the plugin’s configuration UI), while also removing a large set of repository automation assets (scripts/workflows/templates) that appear to be template carry-overs.
Changes:
PrettyNameutility to convert slugs liketerms-of-serviceinto display text likeTerms of Service.MenuslugFieldto fall back to the generated pretty name when a menu item has an empty title.scripts/utilities and.github/workflows/issue templates (significant repo/CI surface change).Reviewed changes
Copilot reviewed 28 out of 30 changed files in this pull request and generated 5 comments.
Show a summary per file
src/src/Utility/PrettyName.phpsrc/src/Field/MenuslugField.phpPrettyNameas a fallback display label for menu items with empty titles.scripts/wrappers/bash/validate_file_headers.shscripts/wrappers/bash/rebuild_indexes.shscripts/wrappers/bash/check_markdown_links.shscripts/validate/check_version_consistency.phpscripts/validate/check_repo_health.phpscripts/validate/auto_detect_platform.phpscripts/index.mdscripts/README.mdscripts/!.gitkeepscripts/directory present after tooling removals.TESTING.mdIMPLEMENTATION_SUMMARY.mdIMPLEMENTATION.md.github/workflows/standards-compliance.yml.github/workflows/security-scan.yml.github/workflows/dependency-review.yml.github/workflows/comprehensive-validation.yml.github/workflows/codeql-analysis.yml.github/workflows/auto-create-dev-branch.yml.github/pull_request_template.md.github/dependabot.yml.github/ISSUE_TEMPLATE/sub-task.yml.github/ISSUE_TEMPLATE/security.md.github/ISSUE_TEMPLATE/request-license.md.github/ISSUE_TEMPLATE/question.md.github/ISSUE_TEMPLATE/feature_request.md.github/ISSUE_TEMPLATE/documentation.md.github/ISSUE_TEMPLATE/dev-branch-tracking.md.github/ISSUE_TEMPLATE/bug_report.mdThe PR title/description focus on adding
PrettyNameand documentation cleanups, but this PR also appears to remove a large amount of workflows/scripts/issue templates. Please ensure the PR description explicitly calls out those operational/CI changes (or split them into a separate PR) so reviewers can assess impact and rollback risk appropriately.@@ -0,0 +17,4 @@* and other machine-friendly string formats.** @since 03.08.05*/The
@since 03.08.05tags introduce a version that doesn't appear to be the current plugin version (repo still references 03.08.04 in the manifest). Either bump the plugin version everywhere for this release or change these@sinceannotations to match the version this ships in to keep versioning consistent.@@ -0,0 +54,4 @@}$words = explode(' ', str_replace(['-', '_'], ' ', $slug));fromSlug()usesempty($slug)which treats the string "0" as empty, and it doesn't trim/normalize whitespace or repeated separators. This can yield an empty result or output with extra spaces for inputs like " terms--of__service ". Consider using a trim check (trim($slug) === '') and splitting on a regex (e.g., one-or-more of[-_\s]) while filtering out empty parts before title-casing.@@ -0,0 +57,4 @@foreach ($words as $index => &$word){$lower = strtolower($word);The
foreach ($words as $index => &$word)loop uses a by-reference variable but doesn'tunset($word)afterward. In PHP this can cause subtle bugs if$wordis reused later in the method/file. Prefer iterating without references (building a new array) or explicitlyunset($word)after the loop.@@ -0,0 +61,4 @@if ($index === 0 || !\in_array($lower, self::LOWERCASE_WORDS, true)){$word = ucfirst($lower);strtolower()/ucfirst()are not UTF-8/multibyte safe, so non-ASCII slugs (e.g., with accented characters) may be cased incorrectly. Consider using multibyte-aware casing (e.g.,mb_convert_case(..., MB_CASE_TITLE, 'UTF-8')/mb_strtolower) or a Joomla Unicode-safe helper if available.