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

add column-gap parameter #36

Merged
merged 8 commits into from
Feb 26, 2024
Merged

add column-gap parameter #36

merged 8 commits into from
Feb 26, 2024

Conversation

quimt
Copy link
Contributor

@quimt quimt commented Oct 30, 2023

parameterized by em units so that a 1.0 gives a reasonably small value independent of screen size

parameterized by em units so that a 1.0 gives a reasonably small value independent of screen size
@HugoGranstrom
Copy link
Owner

Thanks, this seems like a reasonable addition 😄 It seems like you forgot column-gap: in adaptiveColumns. I'll give this a try tomorrow and merge it if I don't find any problems with it 👍

@quimt
Copy link
Contributor Author

quimt commented Oct 30, 2023

Thanks, this seems like a reasonable addition 😄 It seems like you forgot column-gap: in adaptiveColumns. I'll give this a try tomorrow and merge it if I don't find any problems with it 👍

Indeed it does! Sorry for rushing with the PR, and thanks for considering the merge. I'll try to test the code first before PR, as there are a few more features that might be nice and implementable using raw html or nimib resources upstream.

@HugoGranstrom
Copy link
Owner

Oh, optional arguments doesn't work with body: untyped sadly. So you have to create a template without the new parameter:

template columns(body: untyped) =
  columns(0, body)

@quimt
Copy link
Contributor Author

quimt commented Oct 31, 2023

Oh, optional arguments doesn't work with body: untyped sadly. So you have to create a template without the new parameter:

template columns(body: untyped) =
  columns(0, body)

Merged the change after testing. Templates also don't integrate nicely with fmt from std/strformat, so I've used & instead.

@HugoGranstrom
Copy link
Owner

Nice, thanks! 😁 I didn't get the free time today that I wanted so I haven't had time to test this, and I won't have the time for the rest of the week either sadly (I'm moving, lots of packing to be done). But I will get back to you next week (and if I don't, ping me).

@quimt
Copy link
Contributor Author

quimt commented Nov 11, 2023

Ping!

And thanks for filling out this part of the documentation/outreach pipeline for Nim!

Copy link
Owner

@HugoGranstrom HugoGranstrom left a comment

Choose a reason for hiding this comment

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

Thanks for the reminder 😁 I will try the code out tonight but left a comment about string interpolation.

Glad that our work is appreciated ❤️

src/nimiSlides.nim Show resolved Hide resolved
Copy link
Owner

@HugoGranstrom HugoGranstrom left a comment

Choose a reason for hiding this comment

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

I've now been able to test the code out locally and with the requested changes it works for me. So once you have adressed them I'll gladly merge your contributions :D

src/nimiSlides.nim Outdated Show resolved Hide resolved
src/nimiSlides.nim Show resolved Hide resolved
src/nimiSlides.nim Outdated Show resolved Hide resolved
src/nimiSlides.nim Outdated Show resolved Hide resolved
@quimt
Copy link
Contributor Author

quimt commented Nov 22, 2023

Implemented now. 0.0 was consistent with preexisting code in chrome; this led to crowding which was an extra incentive for the change. I agree that 1em or 0.5em is a more sensible default.

@HugoGranstrom
Copy link
Owner

Thanks, weird that the default was 0 when they say it should be 1 🤔

There are still 2 comments that you have to address before I can merge this though. As it is now, the code doesn't work if you have multiple columns on the same slides.

@quimt
Copy link
Contributor Author

quimt commented Dec 3, 2023

Fixed the overdeletion bugs of the </div> and column-gap .

image

Changed to strutils %-interpolation to match style of surrounding code.

Copy link
Owner

@HugoGranstrom HugoGranstrom left a comment

Choose a reason for hiding this comment

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

Thank you 😁 there seems to have snuck in one more typo, but after that I think I'm content 😄 I will give it a run when I get home in the evening

src/nimiSlides.nim Outdated Show resolved Hide resolved
fixed last bug
@quimt
Copy link
Contributor Author

quimt commented Feb 26, 2024

Sorry, missed the email in the end-of-year hustle. The fix is complete.

fixed to match syntax of %-interpolation: float arg had to be stringified first
@quimt
Copy link
Contributor Author

quimt commented Feb 26, 2024

...or it should have been complete. Sorry about the oversight about interpolation via %. I PR'd one more time.

@HugoGranstrom
Copy link
Owner

Nice job! Thanks, I'll have a final look in the evening but it should be done now 🎉

Copy link
Owner

@HugoGranstrom HugoGranstrom left a comment

Choose a reason for hiding this comment

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

Looks good, thank you again for you contribution 😁 This will make it in the next release of nimiSlides

@HugoGranstrom HugoGranstrom merged commit f99f14a into HugoGranstrom:main Feb 26, 2024
3 checks passed
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

Successfully merging this pull request may close these issues.

2 participants