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

Improve the block transforms to include also anchors when resolving uid back and forth #1746

Merged
merged 5 commits into from
Feb 2, 2024

Conversation

sneridagh
Copy link
Member

Now it covers the use case if an anchor is present.

@sneridagh sneridagh requested review from davisagli and tisto January 30, 2024 08:42
Copy link

netlify bot commented Jan 30, 2024

Deploy Preview for plone-restapi canceled.

Name Link
🔨 Latest commit 42df117
🔍 Latest deploy log https://app.netlify.com/sites/plone-restapi/deploys/65bc226c7ea4f6000840d3a3

@mister-roboto
Copy link

@sneridagh thanks for creating this Pull Request and helping to improve Plone!

TL;DR: Finish pushing changes, pass all other checks, then paste a comment:

@jenkins-plone-org please run jobs

To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass, but it takes 30-60 min. Other CI checks are usually much faster and the Plone Jenkins resources are limited, so when done pushing changes and all other checks pass either start all Jenkins PR jobs yourself, or simply add the comment above in this PR to start all the jobs automatically.

Happy hacking!

@sneridagh
Copy link
Member Author

@jenkins-plone-org please run jobs

src/plone/restapi/deserializer/utils.py Outdated Show resolved Hide resolved
src/plone/restapi/serializer/utils.py Outdated Show resolved Hide resolved
@sneridagh
Copy link
Member Author

sneridagh commented Jan 31, 2024 via email

@sneridagh
Copy link
Member Author

@davisagli I think not, because a suffix is something that matches a /@@ BrowserView. A BrowserView with an anchor, in RESTAPI world? Could be in ClassicLand, but not in RESTAPI. We could make it work, but I think that without a use case, it's premature optimization, could be that there's never a use case for that.

@davisagli
Copy link
Member

@sneridagh Although this is plone.restapi, the URLs that an editor can enter are not API URLs. It could be a browser view that renders HTML including anchors, sure. Here we need to be careful and pass through unchanged anything that is not the path to a content item.

@sneridagh sneridagh requested a review from davisagli February 1, 2024 11:44
Copy link
Member

@davisagli davisagli left a comment

Choose a reason for hiding this comment

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

Uh, the tests are failing...

news/1746.bugfix Outdated Show resolved Hide resolved
Copy link
Member

@davisagli davisagli left a comment

Choose a reason for hiding this comment

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

Okay, let's see what jenkins says...

@davisagli
Copy link
Member

@jenkins-plone-org please run jobs

@davisagli davisagli merged commit bfe0508 into main Feb 2, 2024
25 checks passed
@davisagli davisagli deleted the fixresolveuidswithanchors branch February 2, 2024 01:05
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.

3 participants