-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Add NullableHelper #3389
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 NullableHelper #3389
Conversation
Thanks john-h-k for opening a Pull Request! The reviewers will test the PR and highlight if there is any conflict or changes required. If the PR is approved we will proceed to merge the pull request 🙌 |
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.
Looks like an interesting idea! 😊
Needs some work though, I've left some review comments and we can start from there!
This PR has been marked as "needs attention 👋" and awaiting a response from the team. |
@azchohfi Not sure who handles the bot, but what happened seems like a bug? I have a series of requested changes still pending, @john-h-k made the PR a draft and the bot removed the "Needs author feedback" label and added "Needs attention" despite the fact that the PR is now a draft and that all those requested changes are still there and not addressed. Should we report this or open an issue for the bot somewhere? 🤔 I mean: |
@Sergio0694 I handle the bot 😄 The two labels "needs author feedback" (for author) and "needs attention" (for the team and community) are being utilized as a communication source here. The whole idea of these two labels was that any communication from the team and community will trigger the label "needs author feedback" and any communication from the author should place "needs attention". In this scenario, after all the comments you made, it triggered "needs author feedback." Then because "john-h-k marked this pull request as draft 2 days ago" count as an action therefore bot triggered the "needs attention" label for the rest of the team. There are some situations where the bot is not smart enough to understand the communication because of the certain actions that have been set. I can explore more into this. Thanks 😄 |
Hey @Kyaa-dost, thank you for chiming in and for the explanation! 😊 Yeah the "needs attention" and "needs author feedback" tags are indeed very useful to notify about changes as you said, that was a very good idea! I was just wondering whether it would make sense to explore a specific set of actions (eg. such as just changing a PR from ready to draft) to mark as not counting as triggers for the bot, so that the tags would only be applied upon "meaningful" actions on behalf of users (eg. actual commits, or replies to comments, etc.). Though I understand that this could also get pretty tricky (what actions specifically to choose, where to draw the line exactly, etc.). Just some food for thought in general, I really do like how the bot works already though, great job on that! 😄 |
@Sergio0694 Correct, the whole idea of these labels is effective communication between the author and the team. We just want to make sure both the parties are aware of any changes in the PR whether it's commits, comments, etc. I can certainly look more into different options like Drafts and explore the possibilities. Thanks for the feedback and always feel free to let me know any changes or feature you would like to ease the workflow 😄 |
This pull request has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 15 days. It will be closed if no further activity occurs within 30 days of this comment. |
@john-h-k just wanted to check-in and see if you wanted to take a look at this more and address the feedback from @Sergio0694? If you're busy, that's fine, just give us a heads up and ETA when you think you might get back to it so we can circle-back later at that time. Thanks! |
This pull request has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 15 days. It will be closed if no further activity occurs within 30 days of this comment. |
@john-h-k any update on this? |
This pull request has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 15 days. It will be closed if no further activity occurs within 30 days of this comment. |
@john-h-k have a chance to look at the suggestions @Sergio0694 provided? If not can you please let us know the ET so we can proceed towards a feasible turnaround time. Thanks 😊 |
This pull request has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 15 days. It will be closed if no further activity occurs within 30 days of this comment. |
This pull request has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 15 days. It will be closed if no further activity occurs within 30 days of this comment. |
@Sergio0694 have you heard from John lately, is this something you wanted to help finish cross over the finish line or should we move to 7.1? |
@michael-hawker He's been busy with school and other projects lately, I don't think he'll be able to pick this up again any time soon. I can create a PR based on top of his and finish the feature for 7.0 if you want, sure 😄 |
273a32a
to
f2eb52c
Compare
I rebased the PR and did some more tweaks myself since John has been busy, should be good for review now. FYI @michael-hawker |
@Sergio0694 thanks, seems straight-forward enough. Is this another thing we'd want as a Helper pattern vs. Extension on every generic nullable? |
@michael-hawker I'm thinking leaving this as an extension should be fine, as it's just one method and we already have the same for things such as array extensions and whatnot, plus the method itself is restricted to nullable value types. The main issue with the object extensions is that they were extremely niche (and dangerous), and always visible because almost everything can be cast to an object, so those were just always crowding up IntelliSense. Don't think it'd be worth it to have a static helper with just this 🙂 |
@Sergio0694 @RosarioPulella if one of you want to sign-off we can merge this in! |
Hello @michael-hawker! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
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.
This is ready to 🚀 🚀
@Kyaa-dost we can merge this one too once the other two in our merge pipeline go forward... 🙂 Maybe we need to write our own bot to help the other bot??? 😋 |
cc @Sergio0694
Introduce a
NullableHelper
type withGetValueOrDefaultRef
which returns aref T
which points to a value that is equivalent toGetValueOrDefault
TODO add tests