Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Socket Twig UI #16365

Merged
merged 1 commit into from
Jan 24, 2024
Merged

Socket Twig UI #16365

merged 1 commit into from
Jan 24, 2024

Conversation

cconard96
Copy link
Contributor

Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets -

Moved Socket-related UI to Twig templates.
Redesigned the form shown on the Sockets tab of Locations. Instead of two forms being shown at the same time, one for adding a single socket and another for adding multiple, there is now only a single form which can switch modes using a slider. For multi-add mode, I also added placeholder text for the two name textboxes to make it clearer to the user how the names are built.

Selection_213
Selection_215

Copy link
Contributor

@orthagh orthagh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Result is far superior to the previous regarding the design.

I'm still a bit annoyed seeing a lot of content in renderFromStringTemplate. This method should help with small twig code. The part in showForLocation seems very big for that.
Example, part in showListForItem is fine, location one is, I think, too big.

Copy link
Contributor

@trasher trasher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See @orthagh comment

src/Socket.php Outdated Show resolved Hide resolved
src/Socket.php Outdated Show resolved Hide resolved
src/Socket.php Outdated Show resolved Hide resolved
@cconard96
Copy link
Contributor Author

I cleaned up the UI some more. The form to add sockets from a location and form to add sockets from an item are now the same. Adding from an item no longer shows a button that takes you to another page to add the socket(s).

@cedric-anne cedric-anne self-requested a review January 18, 2024 07:29
@cedric-anne cedric-anne requested a review from trasher January 23, 2024 14:59
@cedric-anne cedric-anne added this to the 10.1.0 milestone Jan 23, 2024
@cedric-anne cedric-anne dismissed trasher’s stale review January 24, 2024 13:21

Changes were made.

@trasher trasher merged commit 73cf6d3 into glpi-project:main Jan 24, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants