-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Validate JavaScript condition in Layer Rule on save (#12901) #12968
Validate JavaScript condition in Layer Rule on save (#12901) #12968
Conversation
|
||
try | ||
{ | ||
_ = await _evaluator.EvaluateAsync(new() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use ParseScript instead of evaluate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I parse it first and then evaluate? Sébastien Roses second point in the issue is "ensure that evaluating the script is not breaking the full page..." so I have to evaluate and I thought that since EvaluateAsync parses it with ParseScript before evaluation then I only need to catch the exception, otherwise I would be parsing it twice.
This pull request has merge conflicts. Please resolve those before requesting a review. |
I sincerely apologize for us taking so much time here. I checked out the PR, going over old ones, and this would be quite useful. It needs some tweaks, and the merge conflict resolved though. And foremost, so we can do anything with the code, you'd need to accept the CLA (unfortunately, the CLA bot was broken for a while). Is this something you'd like to revisit any time soon @sobotama or should we close? |
Hello, thanks for responding, I completely forgot that this was still unresovled. I took care of the merge conflict, I'm currently figuring out the CLA with the company I work at and in the meantime, is there something else I should do @Piedone? |
@dotnet-policy-service agree |
Great, thank you! @ns8482e would you like to get back to the review, or should I take over? |
This pull request has merge conflicts. Please resolve those before requesting a review. |
@ns8482e could you reply here, please? |
…-condition-validation # Conflicts: # src/OrchardCore.Modules/OrchardCore.Rules/Drivers/JavascriptConditionDisplayDriver.cs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me take over the review here, and thank you for your patience! I have some small remarks; once you address those, I'll merge ASAP.
When addressing review feedback, please adhere to the following:
- Please update your pull request according to feedback until it is approved by one of the core team members.
- Apply suggested changes directly so the reviewer doesn't have to eyeball the changes. These resolve themselves after applying them, and that's fine.
- Don't resolve other conversations so it's easier to track for the reviewer. Then, the reviewer will resolve them.
- Feel free to mark conversations that you addressed to keep track of them with an emoji or otherwise, just don't resolve them.
- Please keep conversations happening in line comments in those convos, otherwise, communication will be a mess. If you have trouble finding them, see this video.
- When you're done addressing all feedback of a review, click "Re-request review" in the top-right corner for each reviewer when you're ready for another round of review, so they know that you're done.
src/OrchardCore.Modules/OrchardCore.Rules/Drivers/JavascriptConditionDisplayDriver.cs
Outdated
Show resolved
Hide resolved
src/OrchardCore.Modules/OrchardCore.Rules/Drivers/JavascriptConditionDisplayDriver.cs
Outdated
Show resolved
Hide resolved
src/OrchardCore.Modules/OrchardCore.Rules/Drivers/JavascriptConditionDisplayDriver.cs
Show resolved
Hide resolved
src/OrchardCore.Modules/OrchardCore.Rules/Drivers/JavascriptConditionDisplayDriver.cs
Outdated
Show resolved
Hide resolved
Changed error messages, comment moved to more meaningfull place Co-authored-by: Zoltán Lehóczky <[email protected]>
WalkthroughWalkthroughThe update primarily enhances the Changes
Recent Review DetailsConfiguration used: CodeRabbit UI Files selected for processing (2)
Additional comments not posted (4)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
@allcontributors please add @sobotama for code |
I've put up a pull request to add @sobotama! 🎉 |
Thank you, and congrats on your first contribution to Orchard Core! I promise the next one won't take us two years to accept :). We implemented a lot of improvements in managing PRs since then: #15029. Once the docs page build finishes, you'll also show up in the hall of fame here: https://docs.orchardcore.net/en/latest/docs/community/contributors/. |
Congratulations on your first PR merge! 🎉 Thank you for your contribution! We're looking forward to welcome other contributions of yours in the future. @all-contributors please add @sobotama for code. If you like Orchard Core, please star our repo and join our community channels |
@github-actions[bot] I couldn't determine any contributions to add, did you specify any contributions? @sobotama already contributed before to code |
Ah, I forgot that adding contributors is now automated :). |
Fix #12901