Skip to content

Conversation

@marcusmoore
Copy link
Collaborator

@marcusmoore marcusmoore commented Jan 14, 2025

This PR introduces the <x-input.textarea> blade component and uses it to replace Form::textarea usage in our blade templates.


Pages Affected

Modals Affected


Extracted via copy/paste from #15983.

@what-the-diff
Copy link

what-the-diff bot commented Jan 14, 2025

PR Summary

  • Introduction of a New Text Area Component
    This PR focuses on the introduction of a new text area component to the Blade file, simplifying existing codes and making it more reusable for future needs.

  • Updated Usage of New Text Area Component
    Replacing the previous Form::textarea with the newly-created <x-input.textarea> component, this update provides greater consistency in multiple files including, but not limited to:

    • 'Edit Fields' section in custom fields
    • EULA text area in category edit form
    • Notes input in file upload modal
    • Custom CSS and footer text inputs in branding settings
    • Default EULA text in general settings
    • LDAP TLS key and cert fields in LDAP settings
    • SAML settings inputs in SAML settings

These changes promote a uniform implementation of the text area component, thus making the platform more synchronized and manageable.

Copy link
Member

@snipe snipe left a comment

Choose a reason for hiding this comment

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

Looks like we have a conflict here, and this is targeted to master

@snipe snipe changed the base branch from master to develop February 10, 2025 23:47
@snipe snipe changed the base branch from develop to master February 10, 2025 23:47
@snipe
Copy link
Member

snipe commented Feb 10, 2025

I think I fixed the conflict, but the branch switch is a bit messy - possible for you to rebase or merge down?

@marcusmoore
Copy link
Collaborator Author

I'll take a look.

@snipe
Copy link
Member

snipe commented Feb 10, 2025

I am, of course, in the middle of adding textareas to a bunch of forms right now lolsob. I'll put them in as in my PR and then update them to this format once it's targeted to develop and merged.

@marcusmoore marcusmoore changed the base branch from master to develop February 11, 2025 00:01
@marcusmoore marcusmoore changed the base branch from develop to master February 11, 2025 00:01
@snipe
Copy link
Member

snipe commented Feb 11, 2025

Looks like Sqlite tests are failing

@marcusmoore
Copy link
Collaborator Author

The sqlite tests are due to a mismatched timestamp. Another run should get them to green.

Now that it is caught up to master I'm not sure how to do the branch change cleanly...

@snipe snipe changed the base branch from master to develop February 11, 2025 00:10
@snipe snipe merged commit aa14cfe into grokability:develop Feb 11, 2025
11 of 12 checks passed
@marcusmoore marcusmoore deleted the chore/migrate-textarea-helper branch February 11, 2025 00:15
@snipe
Copy link
Member

snipe commented Feb 11, 2025

I'm guessing you must have branched off of master to start with, based on the changes (and the version.php).

Please also make sure you are using translation strings for placeholder text.

@@ -0,0 +1,11 @@
@props([
'value' => '',
'cols' => 50,
Copy link
Member

Choose a reason for hiding this comment

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

I hadn't noticed this, but we don't actually use cols, since we let bootstrap handle the width.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The Form::textarea call actually added those in there so the resulting html included it. Should I remove it as an prop in the component?

Copy link
Member

Choose a reason for hiding this comment

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

Probably - it won't matter, since the CSS will override it, but we don't need it. Not urgent tho. The behavior will be the same.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Just did it so I didn't forget about it 😅

https://github.com/snipe/snipe-it/pull/16225

@marcusmoore
Copy link
Collaborator Author

I'm guessing you must have branched off of master to start with, based on the changes (and the version.php).

Those changes came along with the "catch up" merge from what I can tell. I think if the order was flipped and the target branch was changed to develop then caught up it would've worked out cleaner.

Please also make sure you are using translation strings for placeholder text.

My intention was to do the replacements as simply as possible and avoid extracting new translation entries for the untranslated strings I came across. I can open a follow up PR extracting those though.

@snipe
Copy link
Member

snipe commented Feb 11, 2025

My intention was to do the replacements as simply as possible and avoid extracting new translation entries for the untranslated strings I came across. I can open a follow up PR extracting those though.

I get it, but we always end up missing stuff. Hang on for adding those, since I'm creating a new array for placeholders in general - you can add to that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants