Page MenuHomePhorge

Add instructions to Create Repository form fields for Callsign and Short Name
ClosedPublic

Authored by Ekubischta on Wed, Feb 26, 23:19.

Details

Summary

When I create new repos, I always forget which is which (between Callsign and Short Name)

This adds helpful text as a placeholder and as control instructions

I am not sure if this layout is 100% better, but this is an option as well

Add new Repository

image.png (633×1 px, 28 KB)

Edit existing Repository

image.png (595×1 px, 29 KB)

Closes T15742

Test Plan

Added a new repository and saw these control instructions

Diff Detail

Repository
rP Phorge
Branch
arcpatch-D25898
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 1765
Build 1765: arc lint + arc unit

Event Timeline

  • There's already a "description" field on these, which I think was supposed to be displayed; We might have lost it at some point, which is concerning.
  • Use pht() for all human-visible text, to allow translation.
  • There's already a "description" field on these, which I think was supposed to be displayed; We might have lost it at some point, which is concerning.

Right. T15526

Edited: no. need a task

  • Refactored to use the setControlInstructions method on the control

I found a method called setControlInstructions that adds helpful text above the field

I am not sure if this layout is 100% better, but this is an option as well

Add new Repo

image.png (731×1 px, 31 KB)

Edit existing Repo

image.png (701×1 px, 27 KB)

Ekubischta edited the summary of this revision. (Show Details)
Ekubischta edited the test plan for this revision. (Show Details)

setControlInstructions() is the right approach, after looking at other usage of it.
Tested the patch locally and works as expected.
I'd probably rephrase to "Callsign is the monogram rXXXX for this repository. It cannot contain spaces." and "Short Name is part of the URI paths for this repository. It cannot contain spaces." (we don't seem to use "repo" but only "repository" across the codebase, and use full stops), and drop the Placeholders (to have all helpful info in a single line), and rename the patch to "Show descriptions for "Callsign" and "Short Name" Repository form fields" (or such).
Apart from all that my nitpicking, good to go. Thanks for the patch!

close enough for my taste; Just add . at the end of each sentence.

Also, I think that visually, the instructions are too close to the next field and too far from their own field, but that's far out-of-scope for this one.

src/applications/diffusion/editor/DiffusionRepositoryEditEngine.php
292

add . and call this good

Also, I think that visually, the instructions are too close to the next field and too far from their own field, but that's far out-of-scope for this one.

@avivey - I am looking at the EditEngine to see if there is a way to align to fields side by side?

That might visually help this form if the Call Sign and Short Name were side by side instead of on top of each other. Then the control instructions will align better.

Currently the control instructions visually are weird in this case because it seems like they belong to the item above it

Another option is to add instructions to both the name and description field to make them consistent

Ekubischta edited the test plan for this revision. (Show Details)
  • Updates after review to wording and dropped the placeholders
Ekubischta edited the test plan for this revision. (Show Details)
Ekubischta marked an inline comment as done.

Looks good to me. Feel free to land. Thanks for the patch!

This revision is now accepted and ready to land.Sun, Mar 9, 14:01
aklapper retitled this revision from Added helpful placeholders to the Create Repository form fields for Callsign and Short Name to Add instructions to Create Repository form fields for Callsign and Short Name.Sun, Mar 9, 14:02