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 support for float numbers (positive & negative) in the z-index style property #3171

Merged
merged 3 commits into from
Oct 19, 2023

Conversation

maxkfranz
Copy link
Member

@maxkfranz maxkfranz commented Sep 27, 2023

Cross-references to related issues. If there is no existing issue that describes your bug or feature request, then create an issue before making your pull request.

Associated issues:

Notes re. the content of the pull request. Give context to reviewers or serve as a general record of the changes made. Add a screenshot or video to demonstrate your new feature, if possible.

  • Revise z-index property to use a nonNegativeNumber type rather than nonNegativeInt.
  • Revise documentation accordingly.
  • N.b. this does not change the non-negative constraint on the z-index values.
  • This has been manually verified on the debug page.

Checklist

Author:

  • The proper base branch has been selected. New features go on unstable. Bug-fix patches can go on either unstable or master.
  • N/A : Automated tests have been included in this pull request, if possible, for the new feature(s) or bug fix. Check this box if tests are not pragmatically possible (e.g. rendering features could include screenshots or videos instead of automated tests).
  • The associated GitHub issues are included (above).
  • Notes have been included (above).

Reviewers:

  • All automated checks are passing (green check next to latest commit).
  • At least one reviewer has signed off on the pull request.
  • For bug fixes: Just after this pull request is merged, it should be applied to both the master branch and the unstable branch. Normally, this just requires cherry-picking the corresponding merge commit from master to unstable -- or vice versa.

- Revise `z-index` property to use a `nonNegativeNumber` type rather than `nonNegativeInt`.
- Revise documentation accordingly.
@maxkfranz maxkfranz added this to the 3.27.0 milestone Sep 27, 2023
@maxkfranz maxkfranz requested a review from d2fong September 27, 2023 19:08
@maxkfranz
Copy link
Member Author

@d2fong, I've attached a build you can test in Cyweb:

build.zip

@d2fong
Copy link
Member

d2fong commented Oct 2, 2023

thanks I'll test it out.

@d2fong
Copy link
Member

d2fong commented Oct 4, 2023

@maxkfranz Is it possible to also support negative numbers? Like -1.0, -1.1?

@maxkfranz
Copy link
Member Author

@maxkfranz Is it possible to also support negative numbers? Like -1.0, -1.1?

What's the expected behaviour for a negative number in Cyweb?

The behaviour of z-index in CSS proper is complex for negative values: https://stackoverflow.com/questions/33217407/css-negative-z-index-what-does-it-mean

@d2fong
Copy link
Member

d2fong commented Oct 5, 2023

I would assume that -1.0 would be rendered over -1.1 but let me double check with the cytoscape group.

Ref: Add support for float numbers in the z-index style property #3160
@maxkfranz maxkfranz changed the title Add support for float numbers in the z-index style property Add support for float numbers (positive & negative) in the z-index style property Oct 19, 2023
@maxkfranz
Copy link
Member Author

@d2fong, I've removed the restriction on negative numbers in eff8c8c.

Let me know if you run into any issues with it. Otherwise, let's get this merged for CyWeb.

@d2fong
Copy link
Member

d2fong commented Oct 19, 2023

Hi Max, its working well. Thank you.

@d2fong d2fong merged commit b1751b8 into unstable Oct 19, 2023
2 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