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

Select File... button size (File upload modal window) #13521

Closed
2 tasks done
MaksaUniver opened this issue Aug 24, 2023 · 6 comments
Closed
2 tasks done

Select File... button size (File upload modal window) #13521

MaksaUniver opened this issue Aug 24, 2023 · 6 comments

Comments

@MaksaUniver
Copy link

Debug mode

Describe the bug

It's quite simple. When screen is wider than 992px, Select File... button is fixed to 25% width from total width of modal window. That by itself is not a issue with English translation, but it is when translated text is longer. You can see it on first screenshot. Second screenshot is when screen width is less than 992px. Button takes the full width and the issue is no longer present.

Reproduction steps

  1. Open File Upload modal window with screen wider than 992px,
  2. Open browser's developer tools and find the button text
  3. Change text to something way longer (20+ characters)

Expected behavior

Button size should auto resize based on the width of the text.

Screenshots

image
image

Snipe-IT Version

6.1.2

Operating System

Ubuntu

Web Server

Apache

PHP Version

7.4.3

Operating System

Windows

Browser

Edge

Version

116

Device

No response

Operating System

No response

Browser

No response

Version

No response

Error messages

No response

Additional context

No response

@welcome
Copy link

welcome bot commented Aug 24, 2023

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

@snipe
Copy link
Owner

snipe commented Aug 27, 2023

I'm not really sure what the solution is here, since it's not really possible (or at least not straightforward) to dynamically change button width based on the amount of text inside it. We can dynamically resize the button based on the screen width, but it looks pretty weird in shorter languages having a gigantic button with only a little text on it.

@MaksaUniver
Copy link
Author

MaksaUniver commented Aug 28, 2023

I've experimented with different classes, and I believe the perfect one is col-md-12. Button size itself will be as wide as text, and maximum width will be full modal window width.

image

@snipe
Copy link
Owner

snipe commented Aug 28, 2023

I'm aware of what col-md-12 does, but that changes the layout, and on smaller text options, it means that the layout will be inconsistent. Once you select a file (or several), the space to the right is used to display the filenames of what you selected. Pushing content down in modals after they have loaded can create weird behavior, especially on mobile.

@MaksaUniver
Copy link
Author

I'm sure you are more aware of issues with layout, but I don't see the problem when all divs are set with col-md-12. Whatever the decision is, you can close this issue as I won't bother you with it anymore. Cheers!

image

snipe added a commit that referenced this issue Aug 28, 2023
…tton_wider

Fixed #13521 - make modal “select files” button wider
@snipe snipe closed this as completed in 582cad2 Aug 28, 2023
@snipe
Copy link
Owner

snipe commented Aug 28, 2023

This fix is on master now

DarthKillian added a commit to DarthKillian/eti-assets that referenced this issue Sep 28, 2023
* Added name order to settings save controller method

Signed-off-by: snipe <[email protected]>

* Switch to getFullNameAttribute() in user transformer

Signed-off-by: snipe <[email protected]>

* Removed getCompleteNameAttribute(), modified getFullNameAttribute()

Signed-off-by: snipe <[email protected]>

* New strings

Signed-off-by: snipe <[email protected]>

* Changed width of locale field

Signed-off-by: snipe <[email protected]>

* Added form macro for name format

Signed-off-by: snipe <[email protected]>

* Switched to getFullNameAttribute() from fullName() in User Presenter

Signed-off-by: snipe <[email protected]>

* Added name display format, tweaked some

Signed-off-by: snipe <[email protected]>

* Tweak layout

Signed-off-by: snipe <[email protected]>

* Switched from fullName() to getFullNameAttribute()

Signed-off-by: snipe <[email protected]>

* Add simple tests around asset check in

* adds id to history info

* adds some spacing

* Add last checkin options to report front end

* Default to using the current date if last check in end date is not provided

* Bump nyholm/psr7 to 1.6.1

* Bump guzzlehttp/psr7 to 2.4.5

* Removed unused translation

Signed-off-by: snipe <[email protected]>

* Small fixes to checkbox layout in general settings blade

Signed-off-by: snipe <[email protected]>

* removes encrypted info from change log, renames asset_eol_date in the change log

* eager loaded changedInfo queries, reworked encrypted data change log changes

* retarget key

* removed dead space

* Add withTrashed to asset model query

* Remove trans() from default values

Signed-off-by: snipe <[email protected]>

* adds soft deletes to eager loading

* adds soft deletes to eager loading

* fixes conflicts

* Add condition in LicenseCheckinController:bulkCheckin method to evaluate if the license is reassignable

* Disable the Checkin All Seats button if License is not reassignable

* Run tests for PHP 7.4, 8.0, and 8.1.1

* Explicitly declare $clean_meta variable

* Clear commented log statements

* adds min_amt to asset model edit, index, and table

* fixing my mess

* fix conflicts

* working on getting notifications

* Adds readable asset history in the action log transformer

* adds id to history info

* adds some spacing

* revert unwanted changes

* revert changes of composer.lock

* removed unnecessary code

* fixed lost changes

* Added a condition to send correct model id when cloning one

* Add a variable so I dont ended rewriting the original model

* Added link to the help docs

Signed-off-by: snipe <[email protected]>

* Tighter layout

Signed-off-by: snipe <[email protected]>

* Fixed snipe#13521 - make modal “select files” button wider

Signed-off-by: snipe <[email protected]>

* Try to prevent the browser from pre-filling the LDAP password

Signed-off-by: snipe <[email protected]>

* Use int not string if no DB_PORT specified

Signed-off-by: snipe <[email protected]>

* Removed stray line

Signed-off-by: snipe <[email protected]>

* Set password property properly

Signed-off-by: snipe <[email protected]>

* Reverse orderof parent

Signed-off-by: snipe <[email protected]>

* Pass the model_id variable in the controller and get it only if we are cloning the asset model

* reworks company queries for asset history

* Add failing test

* Ensure users are scoped by company in index method

* Bumped hash

Signed-off-by: snipe <[email protected]>

* Upgrade less from 4.1.2 to 4.2.0 snipe#13534

Signed-off-by: snipe <[email protected]>

* Upgrade @fortawesome/fontawesome-free from 6.4.0 to 6.4.2 snipe#13527

Signed-off-by: snipe <[email protected]>

* Updated assets

Signed-off-by: snipe <[email protected]>

* Fixed bug introduced in snipe#13528

Signed-off-by: snipe <[email protected]>

* Fixed bug introduced in snipe#13528

Signed-off-by: snipe <[email protected]>

* Don’t cast as boolean, validate as boolean

Signed-off-by: snipe <[email protected]>

* Update assertions to account for type change

* Early return if no asset is found

* Adds a null coalescing operator to the license seat checkin notification

* Added tests

Signed-off-by: snipe <[email protected]>

* Un-cast byod, validate as boolean

Signed-off-by: snipe <[email protected]>

* Update testing documentation

* Remove Dusk

* Add failing test

* Scaffold tests and add context

* Added model name and number to dynamic url

Signed-off-by: snipe <[email protected]>

* Track changes on asset checkin/out

* Account for hard-deleted models, suppliers

Signed-off-by: snipe <[email protected]>

* Use same method of accessing companies as others

Signed-off-by: snipe <[email protected]>

* Removed soft-delete query

Signed-off-by: snipe <[email protected]>

* Fixed snipe#13562 - allow inline view for uploaded files

Signed-off-by: snipe <[email protected]>

* Added inline=true to image preview modal

Signed-off-by: snipe <[email protected]>

* Move the early return to the controller instead of the Label model

* Add rtd_location_id to tracked changes on checkin actionlog

* Add guard clauses around some License and LicenseSeat models functions

* Begin to implement patch test

* Upgrade to new branch for our fork of laravel-scim-server

* Update to only use relative paths

Signed-off-by: snipe <[email protected]>

* Implement test case

* Filter unaccepted assets that are not assigned to users

* Formatting

* Remove unused test cases

* Test permissions update

* Relax property type check

* Remove todo

* Update assertion and add failure messages

* Upgraded actions/checkout to v4 (via snipe#13580)

Signed-off-by: snipe <[email protected]>

* removes commented code

* Add a boolean variable and condition to handle the call to checkedOutToUser() method

* Guard against attempting to send notification to model that isn't notifiable

* fixed nullability of  on Asset Models

* changed the down method change

* Reset assigned_x values when changing check out to type

* Evaluate if the event properties exists before run the CheckoutAcceptance query

* Use $attributes array

Signed-off-by: snipe <[email protected]>

* Fixed checkbox formatting on quickstart

Signed-off-by: snipe <[email protected]>

* Removed stray text

Signed-off-by: snipe <[email protected]>

* Remove ChipperCI

* Simplify upload messaging

Signed-off-by: snipe <[email protected]>

* Fixed import error warning

Signed-off-by: snipe <[email protected]>

* Revert large warning size

Signed-off-by: snipe <[email protected]>

* Typo

Signed-off-by: snipe <[email protected]>

* Removed stray space

Signed-off-by: snipe <[email protected]>

* Fixed snipe#13592 - unable to delete model from view page

Signed-off-by: snipe <[email protected]>

* Bumped hash

Signed-off-by: snipe <[email protected]>

* Use relative path in backups for cleaner directory structure

Signed-off-by: snipe <[email protected]>

* Fixes snipe#13609 - disallow sorting on age

Signed-off-by: snipe <[email protected]>

* Fixed regression that disabled sticky headers

Signed-off-by: snipe <[email protected]>

* Added column re-ordering

Signed-off-by: snipe <[email protected]>

* Made develop the target branch

Signed-off-by: snipe <[email protected]>

* Bump docker/login-action from 2 to 3 (snipe#13619)

Signed-off-by: snipe <[email protected]>

* Bump docker/build-push-action from 4 to 5

Signed-off-by: snipe <[email protected]>

* Replaces snipe#13617 - Bump docker/setup-buildx-action from 2 to 3

Signed-off-by: snipe <[email protected]>

* Replaces snipe#13616 - Bump docker/metadata-action from 4 to 5

Signed-off-by: snipe <[email protected]>

* Updated assets

Signed-off-by: snipe <[email protected]>

* Fixed snipe#13628 - removed duplicate favicon tag

Signed-off-by: snipe <[email protected]>

* Add factories to autolabeler action

* Add unique() to some factory properties

* Display error message if import file deleted before it can be selected

* Remove unnecessary redirect

* Added some mail settings to /settings for easier reference

Signed-off-by: snipe <[email protected]>

* Added Khmer as an available language

Signed-off-by: snipe <[email protected]>

* Added new translations

Signed-off-by: snipe <[email protected]>

* Bumped version

Signed-off-by: snipe <[email protected]>

* A few more config options

Signed-off-by: snipe <[email protected]>

* Fixed table

Signed-off-by: snipe <[email protected]>

* Check for null company ID

Signed-off-by: snipe <[email protected]>

* Fixed typo

Signed-off-by: snipe <[email protected]>

* Commented out sortable columns

Signed-off-by: snipe <[email protected]>

* Fix default.blade.php

Signed-off-by: Darth Killian <[email protected]>

* Fix AssetCheckoutController (missing bracket)

Signed-off-by: Darth Killian <[email protected]>

* Fix AssetCheckoutController (again)

Signed-off-by: Darth Killian <[email protected]>

* Abandoning trying to fix checkout controller...

Reset checkout controller to what I know works until I can find a nice
way to merge changes from snipe it

Signed-off-by: Darth Killian <[email protected]>

* Update composer packages

Signed-off-by: Darth Killian <[email protected]>

---------

Signed-off-by: snipe <[email protected]>
Signed-off-by: Darth Killian <[email protected]>
Co-authored-by: snipe <[email protected]>
Co-authored-by: Marcus Moore <[email protected]>
Co-authored-by: Godfrey M <[email protected]>
Co-authored-by: Godfrey Martinez <[email protected]>
Co-authored-by: Ivan Nieto Vivanco <[email protected]>
Co-authored-by: Johnson Yi <[email protected]>
Co-authored-by: johnson-yi <[email protected]>
Co-authored-by: Brady Wetherington <[email protected]>
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

No branches or pull requests

2 participants