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

Gap filling functionality #1716

Open
wants to merge 62 commits into
base: master
Choose a base branch
from

Conversation

smihuc
Copy link

@smihuc smihuc commented Apr 25, 2022

This allows any empty spaces in the layout to be filled with a single component. For example, an "add item" button that is always in the empty space and can add a card right where it is located.

Here are some demos - see the example code in the PR:
Screen Shot 2022-04-25 at 2 24 27 PM

Screen.Recording.2022-04-25.at.2.29.28.PM.mov

How we use it in our product, DeepSea:

Screen.Recording.2022-04-25.at.2.28.58.PM.mov

My team have actually been using this code in our product for a few years now with no issue, and there are a few reasons I'd really like to see it integrated into react-grid-layout:

  • I think it would be useful in many grid applications, and feels better & more intuitive than other UI/UX options for adding items to the layout
  • as far as I've found no other grid library has this ability
  • this would allow us to use the main release of react-grid-layout rather than rolling our own fork.

This functionality & PR has been built by @drunkplato (Trent Gillham), @presseyt (Tim Pressey) and myself while working at White Whale.

Please let me know if you'd like me to make a corresponding issue - I don't think one is needed but I can make one if it helps track things better!

…yout.. needed to compare the children as well as the layout because somehow the this.props.layout was set without receivingprops
@John-Al
Copy link

John-Al commented Jun 2, 2022

This is an awesome addition to the current functionality of RGL and I think we should really look into this as I have a use case for it straight away.

@ConcernedHobbit
Copy link

This would be a great addition, and I have a use case for this in mind already. If this needs help (for example with reviewing), I'll gladly dedicate some time after maintainers comment on feasibility.

@HazTheGoat
Copy link

This is a very needed functionality for RGL. Why is this not merged in yet?

@dennisoelkers
Copy link

dennisoelkers commented Dec 22, 2022

Hey @STRML,

this is a very useful feature. What could be done to help with the process of merging it?

@ddolcimascolo
Copy link

I just noticed this PR. This looks very nice indeed.

Maybe @smihuc you can rebase it to make sure everything works against the latest master? Then we can ask @STRML if this can be merged in a a new minor.

Cheers,
David

@STRML
Copy link
Collaborator

STRML commented Oct 28, 2023

I'd be willing to merge this if it were rebased clean and with tests.

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.

None yet

8 participants