-
-
Notifications
You must be signed in to change notification settings - Fork 844
Inserted Search Tip Modal Into the Project Page Below the Filter Dropdown #7985
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
Conversation
|
Want to review this pull request? Take a look at this documentation for a step by step guide! From your project repository, check out a new branch and test the changes. |
|
ETA: 3/15/2024 EOD |
|
ETA: EOD 3/15 |
|
ETA: 3/14 eod |
Six5pAdes
left a comment
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.
Hi there, @dvernon5! Well done with fixing this issue.
What's Done Well:
- The issue correctly links.
- The PR title is informative, as are both the what and why for its changes in the contents.
- All of the changes made appear correctly on the local environment, both in the code and the resulting updated page.
What Can Be Changed In The Future:
- removing the default images that are shown included in the screenshot section
image
Feel free to take the suggestion(s) into account for your next issue/PR. In the meantime, I approve this PR.
|
Thank you for your feedback! I took your advice and removed the default images. Great catch. I will be more attentive next time. |
|
ETA: 3/11 |
|
ETA: 3/14 |
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.
@dvernon5 my brother amazing work here.
few things I run into and if you can correct them:
-
on desktop the search bar is on top of the modal, you may want to increase the
z-indexof overlay. the search bar isz-index:10and your overlay isz-index: 1

-
on mobile the modal seems to be off on one side and not centered, this is cause by the overlay width, if you replace
width: calc(100vw +17px)withwidth:100vwshould fix it , but try it yourself first.

-
Do not forget to let us know what files you have added, updated or deleted (🤭) on the "What Changed section"
… is click and activated
|
Hello @siyunfeng Thank you for reaching out with an update! I wanted to inform you that I've made the changes according to @gmgonzal request and re-requested his review. Based on the comments, it looks like he will review my issue sometime tomorrow. I understand that everyone has busy lives, so I'm patiently waiting. |
assets/js/current-projects.js
Outdated
| document.addEventListener('keydown', tabFocusedKeyDownHandler); | ||
|
|
||
| // Event listener for search tip modal | ||
| openSearchTipsModal(); |
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.
- please rename the function to "attachEventListenerTo...". We want the function names to be as close to a description of the functionality as possible!
assets/js/current-projects.js
Outdated
| openSearchTipsModal(); | ||
|
|
||
| // Close Search Tips Modal. | ||
| closeSearchTipsModal(); |
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.
- please rename the function to "attachEventListenerTo...". We want the function names to be as close to a description of the functionality as possible!
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.
Well done @dvernon5! I see the filter functionality is working again on my setup. Your triage and analysis of the JS issue was very well done, this is what engineering is about :)
I have requested some minor changes to the function names that I think would be good to have. After these changes are made, we should be good to approve!
|
Thanks again for your feedback! I do have a different take on the naming convention, though. You mentioned wanting function names "as close to a description of the functionality as possible," and I completely agree, that's why I went with Furthermore, I'm concerned that changing them now would mean re-pushing and re-requesting reviews from everyone, which could delay things since the code's already functional. Other reviewers didn't flag this, and I don't see it breaking any established convention. Is this worth the extra round, or can we stick with what's working and approved as-is? |
|
I see your point. Let me provide more support for this ask. When I first saw the "open/close" function calls, I thought that these functions were effectively opening and closing the modal, which they are not (and this resulted in some confusion for me). What the functions are actually doing is attaching a listener, and only once these listeners are triggered will they "open/close" the modal. I do believe there is a subtle but important difference there. For example, in file You make a good point about the cost of having another round of reviews. To that I would say that it is not necessary for everyone to re-review since the only change would be to rename a couple of functions that are introduced by your changes and only called once each, so a CodeQL Alert check would suffice :) Let me know what you think. |
gmgonzal
left a comment
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.
I am seeing the following behavior on web and mobile, could you check if you are seeing the same? It appears like the default table html is always being rendered. Also the Search Tips link is no longer working, the modal is no longer popping up when I click on it.
I am viewing on Firefox.
|
Woah, Firefox is not doing that on my end. My functionalities remain the same. Website |
|
In your URL, try entering |
gmgonzal
left a comment
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.
@dvernon5 how strange! After re-branch and re-pulling your changes, I see everything working as expected for both web and mobile. Well done! PR approved :)
|
@dvernon5 thanks for working through all the changes on this, everything looks good when I tested the modal. I do agree with @gmgonzal about renaming the two functions that add event listeners to open/close the modal so they're more clear. You don't have to wait for everyone to re-review afterwards, I will merge it as soon as you make those changes. I also think some of the other points @gmgonzal made suggest we may want to open an ER to investigate making the modal a reusable element since we now have them on two pages. I know the functionality is slightly different on the Wins page since the modal is toggled off on mobile, but the CSS and Javascript could potentially be factored out into their own files. Let me know your thoughts knowing how the modals on both pages work. |
…nModal and closeSearchTipModal to attachEventListernerCloseModal
|
Hello @daras-cu Thank you for your feedback. I renamed the two functions to make the codebase clearer. Regarding the modal, I think you're right we could make the modal reusable by factoring out the CSS and JS into separate files. Since the modal's style and structure are the same on both the Wins and Projects pages, we could create a single I believe this approach could work since the Wins page modal is toggled off on mobile anyway, and. a dropdown could replace it there without affecting the Projects page. We'd just need to make sure the JS is flexible enough to detect the page and plan accordingly. What do you think about this strategy? I hope I answered your question correctly. |
daras-cu
left a comment
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.








Fixes #7866
What changes did you make?
website/_includes/current-projects.htmlwebsite/_includes/current-projects.html,website/_sass/elements/search-bar.scss, andwebsite/assets/js/current-projects.jsWhy did you make the changes (we will use this info to test)?
CodeQL Alerts
After the PR has been submitted and the resulting GitHub actions/checks have been completed, developers should check the PR for CodeQL alert annotations.
Check the PR's comments. If present on your PR, the CodeQL alert looks similar as shown
Please let us know that you have checked for CodeQL alerts. Please do not dismiss alerts.
Instructions for resolving CodeQL alerts
If CodeQL alert/annotations appear, refer to How to Resolve CodeQL alerts.
In general, CodeQL alerts should be resolved prior to PR reviews and merging
Screenshots of Proposed Changes To The Website (if any, please do not include screenshots of code changes)
Visuals before changes are applied
Visuals after changes are applied