ApollosProject / apollos-embeds

Apollos React Embeds that can be used in Webflow and other third-party websites.
https://www.npmjs.com/package/@apollosproject/apollos-embeds
0 stars 0 forks source link

feat: allow for specifying a custom width for the profile popup #242

Closed jimmyhogoboom closed 1 day ago

jimmyhogoboom commented 2 days ago

🐛 Issue

Closes #233

The profile popup width is based on the viewport width by default, and is absolutely positioned so its width isn't controlled by its container.

✏️ Solution

Implement a new data prop data-search-profile-size which takes a CSS width string, allowing the consumer to specify whatever width they need.

Also nudge the popup to the right 15px to align it with the search bar.

🔬 To Test

I haven't been able to reproduce this locally, only was able to test by directly editing the source in the browser to apply the styling changes.

📸 Screenshots

With data-search-profile-size set to 365px:

Screenshot 2024-11-25 at 9 57 37 AM
linear[bot] commented 2 days ago

APO-1017 (Seacoast) (Web) Alignment on search pop out is off

vercel[bot] commented 2 days ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
apollos-micro-service ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 25, 2024 5:06pm
apollos-web-embeds ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 25, 2024 5:06pm
redreceipt commented 1 day ago

Have you talked to Josh about this solution? If I understand correctly, he'll have to set this on every single customer site?

redreceipt commented 1 day ago

Follow up question, can we set a sane default that can be overridden if necessary?

jimmyhogoboom commented 1 day ago

@redreceipt I have not, I can reach out to him. He should only have to set this in places where the current pop-up doesn't fit, so it will depend on the specific use cases.

Regarding a default to override, I think that's what we have in this PR. The existing behavior would be the default, and setting this new data-search-profile-size attribute would be the override.

redreceipt commented 1 day ago

Got it! Ok we'll merge this and I'll make sure he knows to set this variable if he needs it.