Skip to content

[MPT-65] feat: implement shareable link #906

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Conversation

dabby9734
Copy link
Contributor

@dabby9734 dabby9734 commented Apr 12, 2025

  • mentor query parameter in URL when modal is opened
  • "copy link" button
  • logic to prevent ES from removing our mentor query parameter
  • If the mentor query parameter is present in the URL, the corresponding mentor should be ordered as the first result of the result grid

Copy link

netlify bot commented Apr 12, 2025

Deploy Preview for tender-meitner-99286b ready!

Name Link
🔨 Latest commit 741f00c
🔍 Latest deploy log https://app.netlify.com/sites/tender-meitner-99286b/deploys/67fe07703dd94600086d4335
😎 Deploy Preview https://deploy-preview-906--tender-meitner-99286b.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 95
Accessibility: 95
Best Practices: 100
SEO: 100
PWA: 70
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@dabby9734 dabby9734 marked this pull request as draft April 12, 2025 14:26
@dabby9734 dabby9734 changed the title feat: implement shareable link [MPT-65] feat: implement shareable link Apr 12, 2025
Copy link

linear bot commented Apr 12, 2025

@dabby9734
Copy link
Contributor Author

Currently facing some issues ordering the shard mentor to the first place in the display grid. Pinned queries does what we want, but I can't figure out how to configure it in our query that is constructed with the search-ui library.

@dabby9734 dabby9734 added the Help Wanted Extra attention is needed label Apr 15, 2025
@dabby9734 dabby9734 requested a review from Copilot April 17, 2025 05:32
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • package.json: Language not supported
Comments suppressed due to low confidence (1)

src/lib/preserveTypesEncoder.ts:41

  • The regular expression for decoding booleans uses the '*' quantifier, which may allow unexpected matches. Consider using '/^b_(true|false)_b$/' to ensure only a single occurrence of 'true' or 'false' is matched.
if (/^b_(true|false)*_b/.test(value)) {

Copy link
Member

@wei2912 wei2912 left a comment

Choose a reason for hiding this comment

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

  1. A toast notification should be created upon copying the link - https://mui.com/material-ui/react-snackbar/. Will create a separate issue for this upon merging.
  2. The solution involving the use of search-ui's preserveTypesEncoder and queryString seems a bit clunky, but I don't really see a better solution atm due to the complexity of parsing filters.
  3. A big issue is that the current solution depends on the displayed page containing the mentor in the URL. With changes to Airtable, there's no guarantee that this would be the case.

The current implementation of this feature could lead to user confusion/frustration if (3) is not addressed (e.g. imagine a user relying on the saved URLs to keep track of profiles, and then realising that the URLs are now broken with the only useful info being mentor=reclA0nqEMxI9vOTP which they can't use in the search).

Addressing (3) would require the use of pinned queries in Search UI to bump the result to the top, but there's no good documentation for this feature currently - https://discuss.elastic.co/t/implementing-pinned-queries-in-search-ui/377135. In light of this, I am inclined to postpone this PR till pinned queries are supported well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help Wanted Extra attention is needed ✋ On Hold
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants