Git Product home page Git Product logo

Comments (12)

buresdv avatar buresdv commented on May 24, 2024 1

Reopening due to padding bug.

@rishatl when there's a lot of content, the top and bottom padding breaks in your implementation (which is now on the branch fixed-long-lists):

Snímek obrazovky 2024-03-11 v 0 02 54

Would you mind having a look at it?

from cork.

buresdv avatar buresdv commented on May 24, 2024 1

I think I fixed the underlying problem described in #173. Could you try this branch? https://github.com/buresdv/Cork/tree/fixed-maintenance-sheet

from cork.

rishatl avatar rishatl commented on May 24, 2024

Hey, I'll take it upon myself, make me assignees, pls

from cork.

rishatl avatar rishatl commented on May 24, 2024

@buresdv, check mr👆🏻pls

from cork.

buresdv avatar buresdv commented on May 24, 2024

Fixed by #271

from cork.

rishatl avatar rishatl commented on May 24, 2024

@buresdv Removing fixedSize solved this problem

from cork.

buresdv avatar buresdv commented on May 24, 2024

@rishatl that does fix the padding, but now, most of the text is missing:
Snímek obrazovky 2024-03-11 v 19 02 17

Also, you can expand the sheet to a ludicrous size, which looks bad 😅
Snímek obrazovky 2024-03-11 v 19 02 22

I suppose the fixedSize() has to be somewhere. Do you have any other idea?

from cork.

rishatl avatar rishatl commented on May 24, 2024

@buresdv fixedSize() prevents the view from being expanded, and the text can be of different sizes. I think shortened text is the best solution. Otherwise you will have to bind to constant frame values, which will lead to the same situation of text moving outside the view.

from cork.

buresdv avatar buresdv commented on May 24, 2024

The text was supposed to be shortened, but that was causing crashes (#173). Would it be possible to shorted the text, allow the sheet to expand, but forbid it from expanding indefinitely?

from cork.

rishatl avatar rishatl commented on May 24, 2024

I propose this solution - a limit on the maximum size with the ability to expand only vertically if there is a lot of text.

            .frame(maxWidth: 800, maxHeight: 800)
        }
        .padding()
        .fixedSize(horizontal: true, vertical: false)

from cork.

buresdv avatar buresdv commented on May 24, 2024

That is definitely an interesting solution, but it still suffers from the problem of the sheet being expandable to too large of a size:
Snímek obrazovky 2024-03-13 v 15 51 54

Ideally, the text that lists all the packages would expand as needed (with some sort of a layout priority), and then the rest of the sheet would be laid out. But frames in SwiftUI are a huge mystery to me, so I don't really know how to do that

from cork.

buresdv avatar buresdv commented on May 24, 2024

Since nobody reported any issues, I merged the fix into main (54c9ee2) and will consider this bug fixed by it

from cork.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.