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 in the z-index style property #3160

Closed
4 tasks
d2fong opened this issue Sep 11, 2023 · 9 comments
Closed
4 tasks

Add support for float numbers in the z-index style property #3160

d2fong opened this issue Sep 11, 2023 · 9 comments
Assignees
Labels
pinned A long-lived issue, such as a discussion
Milestone

Comments

@d2fong
Copy link
Member

d2fong commented Sep 11, 2023

Description of new feature

What should the new feature do? For visual features, include an image/mockup of the expected output.

Allow users to specify float numbers for the z-index style property.

Motivation for new feature

Describe your use case for this new feature.

Currently, Cytoscape.js allows only integers for the z-index style property. However, in Cytoscape Desktop, there are instances where users would like to specify values like 1.0 or 1.2 including negative numbers like -1.0 or -10. This change would allow us to avoid another transformation layer when importing networks from Cytoscape Web from Cytoscape Desktop and vice versa.

The downside I can see is that change would make z-index behave slightly different than the css z-index property. Integers will still be supported, but users may find it foreign to allow a z-index be a float number.

For reviewers

Reviewers should ensure that the following tasks are carried out for incorporated issues:

  • Ensure that the reporter has adequately described their idea. If not, elicit more information about the use case. You should iteratively build a spec together.
  • Ensure that the issue is a good fit for the core library. Some things are best done in extensions (e.g. UI-related features that aren't style-related). Some things are best done by app authors themselves -- instead of in Cytoscape libraries.
  • The issue has been associated with a corresponding milestone.
  • The commits have been incorporated into the unstable branch via pull request. The corresponding pull request is cross-referenced.
@maxkfranz
Copy link
Member

maxkfranz commented Sep 11, 2023 via email

@d2fong
Copy link
Member Author

d2fong commented Sep 13, 2023

Let me verify with the rest of the UCSD team.

@d2fong
Copy link
Member Author

d2fong commented Sep 18, 2023

I can confirm that this is the only change the UCSD team needs.

@maxkfranz maxkfranz self-assigned this Sep 26, 2023
@maxkfranz maxkfranz added this to the 3.27.0 milestone Sep 26, 2023
@maxkfranz
Copy link
Member

I'm going to postpone the 3.27.0 release a bit so we can get this feature in for Cyweb ASAP. I'll aim for a Wed/Thu release.

maxkfranz added a commit that referenced this issue Sep 27, 2023
- Revise `z-index` property to use a `nonNegativeNumber` type rather than `nonNegativeInt`.
- Revise documentation accordingly.
@stale
Copy link

stale bot commented Oct 11, 2023

This issue has been automatically marked as stale, because it has not had activity within the past 14 days. It will be closed if no further activity occurs within the next 7 days. If a feature request is important to you, please consider making a pull request. Thank you for your contributions.

@stale stale bot added the stale label Oct 11, 2023
@stale stale bot closed this as completed Oct 18, 2023
@maxkfranz maxkfranz added pinned A long-lived issue, such as a discussion and removed stale labels Oct 18, 2023
@maxkfranz maxkfranz reopened this Oct 18, 2023
@maxkfranz
Copy link
Member

@d2fong, let me know if this is suitable for release.

@d2fong
Copy link
Member Author

d2fong commented Oct 18, 2023

They still want support for negative float values. Is there a large cost to this change? If so this should be ok for now.

@maxkfranz
Copy link
Member

Great, I’ll adjust this tomorrow then. It should be a straightforward change.

maxkfranz added a commit that referenced this issue Oct 19, 2023
Ref: Add support for float numbers in the z-index style property #3160
@d2fong d2fong closed this as completed Oct 19, 2023
@maxkfranz
Copy link
Member

Re-opening, as I see now that I should add a note regarding negative values and how they don't work like traditional CSS, by putting things behind the current layer.

@maxkfranz maxkfranz reopened this Oct 23, 2023
maxkfranz added a commit that referenced this issue Oct 31, 2023
Ref: Add support for float numbers in the z-index style property #3160
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pinned A long-lived issue, such as a discussion
Projects
None yet
Development

No branches or pull requests

2 participants