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

feat: improve responsiveness between different devices / screens #1831

Open
MartinLoeper opened this issue Jan 1, 2025 · 13 comments · May be fixed by #1910
Open

feat: improve responsiveness between different devices / screens #1831

MartinLoeper opened this issue Jan 1, 2025 · 13 comments · May be fixed by #1910
Assignees
Labels
enhancement New feature or request

Comments

@MartinLoeper
Copy link

Describe the bug

I would expect that on different displays, the tiles are re-arranged instead of being scaled. Is this feature on the roadmap already or is this behaviour expected on by-design?

I find it confusing, because my board does not render on a smartphone display at all since tiles get too small.

Example 1: Original Browser Window Width
Screenshot From 2025-01-01 19-45-34

Example 2: Resized Browser Window Width
Screenshot From 2025-01-01 19-45-58

Steps to reproduce

Just resize you board.

Impact

Homarr is unusable on my smartphone device and hard to use when browser is not on full width

Additional information

No response

Version

1.0.0-beta

Installation method

Docker Run

Browser

Chrome

@MartinLoeper
Copy link
Author

Why this behavior is surprising to me: in different places in homarr like admin area, tiles already behave in a different way and the column count is changed instead of the tile being scaled.

@hillaliy
Copy link
Contributor

hillaliy commented Jan 2, 2025

Hi, for small screens the recommendation is to create a dedicated board, so you have one for your PC and one for your mobile. This is expected behavior.

@MartinLoeper
Copy link
Author

Thanks for the quick reply @hillaliy.
That makes sense as a design decision to simplify development!

However, it would be nice if there was one home board for desktop and one for mobile in that case, such that users are automatically seeing the correct one without having to navigate manually when they are on the smartphone.

@hillaliy
Copy link
Contributor

hillaliy commented Jan 2, 2025

My advice is to create two users. One for large screen and one for mobile. Then make the mobile board as home for mobile user etc...

@hillaliy
Copy link
Contributor

hillaliy commented Jan 2, 2025

I appreciate if you will close this issue. Thank again.

@MartinLoeper
Copy link
Author

My advice is to create two users. One for large screen and one for mobile. Then make the mobile board as home for mobile user etc...

I understand that this is a working workaround, but it is also very inconvenient. Especially when using a board for users which do not log in, i.e. guest users and a public board. Also, I am logging myself in via OIDC, so creating two users to cover that use case is just not practical. Can we agree to convert that in some sort of feature request or discussion?

I do understand that there are reasons to not make the boards responsive. But then there should be a viable workaround to cover mobile devices in my opinion. At least as a long term goal.

@darkcloud784
Copy link

My advice is to create two users. One for large screen and one for mobile. Then make the mobile board as home for mobile user etc...

This honestly is a horrible work around and shows a lack of engineering for this part of the project.

@MartinLoeper
Copy link
Author

MartinLoeper commented Jan 2, 2025

@darkcloud784 I would not put it that harshly, but I basically agree. Mostly, because it is not that hard to implement a board selection algorithm based on device type. At least I do not imagine it to be that hard... (disclaimer: I am not a frontend dev)

@manuel-rw
Copy link
Member

manuel-rw commented Jan 2, 2025

Hi, I'll chime in to this issue and quickly explain our thoughts.

  1. The underlying library, that is used to create the drag and drop system, is gridstack.js. We have tried multiple approaches in the past with our users to find our possible solutions for responsiveness. Even if you believe that we haven't invested much resources into this problem - we did. We created multiple private branches, where we experimented with different approaches. Eventually the "small, medium, large" approach made it into the <1.0 Homarr. However, we're not satisfied with it, because it's confusing to new users, takes too much time to configure and is also cumbersome for us to maintain. We forked the library and adjusted it to our own needs because it couldn't do everything that we wanted to do.
  2. Responsiveness is a complex topic, especially with grids. The possible cases, user desires and limitations grow exponentially when trying to consider all factors. For a free to use and open source project, it simply is hardly possible to respect all of those requirements. Just imagine the following example: You have multiple tiles in your dashboard, each with different sizes (some 1 row, some 2 rows, others 1 column, others 2 columns). What should happen if the screen is resized to a significantly smaller size? Should we break the elements onto the next row? Where to we exactly "break" to the next row? What happens with conflicts (eg. bigger tiles conflicting with the position of smaller tiles after breaking into new row)?
  3. As mentioned by @hillaliy , the easiest solution, that will always work, is to create multiple boards for different devices. Then you can always resize the elements perfectly how you want and they will fit.
  4. We are currently looking into more options. At the moment, we do not break tiles into new rows nor dynamically adjust the column count. But you also have to understand that we re-wrote about 60'000 lines of code for Homarr 1.0 and we do not have time to solve every problem. I understand your frustration - but simply put, it isn't as easy as you might be imaging.
  5. We likely will publish Homarr 1.0 in the current state and add more responsive features later. It puts a lot of strain on our team to maintain both "old <1.0 Homarr" and the new version.

Anyhow, if you dislike the current system, give us ideas or contribute to the project. Saying "I dislike X" without any reason seems rather childish.

As a reminder, we do not tolerate toxicity and I will close topics that get too heated - please adhere to the code of conduct. I'm sure we can find a solution together.

@manuel-rw manuel-rw added the decision A decision needs to be taken label Jan 2, 2025
@manuel-rw manuel-rw changed the title bug: missing responsive design for tiles on boards feat: improve responsiveness between different devices / screens Jan 2, 2025
@manuel-rw manuel-rw added the enhancement New feature or request label Jan 2, 2025
@MartinLoeper
Copy link
Author

Hi @manuel-rw, I think most of your post was not directed towards me, so I want to only respond to bullet point 4.

I appreciate the work you guys put into an open source project like this. Understandable that there are some issues that just do not justify to receive more priority. Speaking for myself, I am not frustrated, but only a bit confused since the software seems so feature complete yet lacking basic support for mobile devices.

Thus, here is my idea/suggestion how to go about this issue without a need to rewrite the current dashboard at all:

  • provide a second "home board" selector, e.g. "home board for mobile devices"
  • add some code which detects whether a device has small screen size, e.g. using window.matchMedia javascript
  • redirect to either the home board or the "home board for mobile devices"

I would really appreciate this feature because: I want to show my colleagues at work what homarr is able to accomplish and how great it looks. I most likely convince them when showing a smartphone in lunch break. Having to bring my laptop works, but is definitely not the best advertisement.

I understand if this is not something for the first major release of homarr. I just want to make sure, at least some agree that this is a desirable thing to have in the long term.

@manuel-rw
Copy link
Member

Thanks for the suggestion, @MartinLoeper .
Personally, I would prefer it the board automatically adjusted for the device - but as mentioned, this is quite hard.
Maybe we'll have to settle with this solution? I will discuss this with our team to discuss the possible advantages and disadvantages. I will get back to you.

@Meierschlumpf
Copy link
Member

Okay we decided to add an additional home board setting where you can set your mobile board. It will find out if you are a mobile device by the user agent send to the app

@Meierschlumpf
Copy link
Member

Further responsive support would be nice, but we need to find a good solution before we are able to add it 😉

@Meierschlumpf Meierschlumpf self-assigned this Jan 10, 2025
@Meierschlumpf Meierschlumpf linked a pull request Jan 10, 2025 that will close this issue
4 tasks
@Meierschlumpf Meierschlumpf moved this from In Progress to In Review in Homarr prioritized backlog Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: In Review
Development

Successfully merging a pull request may close this issue.

5 participants