Skip to content

[TASK] Add Positionable interface and implementing trait #1221

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

Merged
merged 2 commits into from
Mar 30, 2025

Conversation

JakeQZ
Copy link
Contributor

@JakeQZ JakeQZ commented Mar 28, 2025

This is for CSS items which have a position in the document.

New methods are added:

  • getLineNumber to replace getLineNo;
  • getColumnNumber to replace getColNo.

These return a nullable int, instead of using zero to indicate absence.

The old methods are now deprecated, but defined in the interface and implemented in the trait.

Note that this change only adds the interface and trait. It does not modify any classes to actually implement or use these.

Part of #1207.

@JakeQZ JakeQZ added the cleanup label Mar 28, 2025
@JakeQZ JakeQZ self-assigned this Mar 28, 2025
@JakeQZ JakeQZ marked this pull request as draft March 28, 2025 02:26
@coveralls
Copy link

coveralls commented Mar 28, 2025

Coverage Status

coverage: 53.134% (+0.3%) from 52.82%
when pulling f38c273 on task/positionable
into 8ea11a4 on main.

@JakeQZ
Copy link
Contributor Author

JakeQZ commented Mar 28, 2025

Deprecation can be brought forward if it's possible to (easily) merge these changes to the 8.x branch. Once the follow-up PR (to use the interfaces) is committed, we'll be able to see how possible that is.

@JakeQZ JakeQZ marked this pull request as ready for review March 28, 2025 23:49
@JakeQZ JakeQZ requested a review from oliverklee March 28, 2025 23:49
@JakeQZ JakeQZ force-pushed the task/positionable branch from 0553f9d to 579ee0f Compare March 29, 2025 00:09
@oliverklee oliverklee changed the title [TASK] Add Positionalable interface and implementing trait [TASK] Add Positionable interface and implementing trait Mar 29, 2025
@JakeQZ JakeQZ force-pushed the task/positionable branch from 579ee0f to f54dadb Compare March 29, 2025 17:29
@JakeQZ
Copy link
Contributor Author

JakeQZ commented Mar 29, 2025

Changelog entries will be added with the follow-up PR to implement and use the interface and trait.

I've fixed the typo in the commit message title.

This is for CSS items which have a position in the document.

New methods are added:
- `getLineNumber` to replace `getLineNo`;
- `getColumnNumber` to replace `getColNo`.

These return a nullable `int`, instead of using zero to indicate absence.

The old methods are now deprecated,
but defined in the interface and implemented in the trait.

Note that this change only adds the interface and trait.
It does not modify any classes to actually implement or use these.

Part of #1207.
@JakeQZ JakeQZ force-pushed the task/positionable branch from f54dadb to d77aba0 Compare March 29, 2025 22:43
@JakeQZ JakeQZ requested a review from oliverklee March 29, 2025 23:23
@oliverklee oliverklee merged commit 5b17141 into main Mar 30, 2025
21 checks passed
@oliverklee oliverklee deleted the task/positionable branch March 30, 2025 06:34
JakeQZ added a commit that referenced this pull request Apr 6, 2025
This is for CSS items which have a position in the document.

New methods are added:
- `getLineNumber` to replace `getLineNo`;
- `getColumnNumber` to replace `getColNo`.

These return a nullable `int`, instead of using zero to indicate absence.

The old methods are now deprecated,
but defined in the interface and implemented in the trait.

Note that this change only adds the interface and trait.
It does not modify any classes to actually implement or use these.

Part of #1207.
JakeQZ added a commit that referenced this pull request Apr 6, 2025
oliverklee pushed a commit that referenced this pull request Apr 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants