Skip to content
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

Pin messages sent by attendees #42

Closed
alxlion opened this issue Jul 31, 2023 · 13 comments
Closed

Pin messages sent by attendees #42

alxlion opened this issue Jul 31, 2023 · 13 comments
Assignees
Labels
💎 Bounty enhancement New feature or request 💰 Rewarded roadmap Planned for the next release

Comments

@alxlion
Copy link
Contributor

alxlion commented Jul 31, 2023

Front

Manager

Add a toggle "Show only pinned messages".

CleanShot 2023-10-20 at 11 01 54

Add a "Pin"/"Unpin" action to a message
CleanShot 2023-10-20 at 11 03 17

On the messages box, with all messages, show the pinned messages first.

Presenter

Show only pinned messages in the presenter if toggle "Show only pinned messages" is enabled.

Attendees view

Add a "Pinned" flag to a message when pinned = true

CleanShot 2023-10-20 at 11 09 57

Use this icon:

<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-pin-filled" width="12" height="12" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
   <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
   <path d="M15.113 3.21l.094 .083l5.5 5.5a1 1 0 0 1 -1.175 1.59l-3.172 3.171l-1.424 3.797a1 1 0 0 1 -.158 .277l-.07 .08l-1.5 1.5a1 1 0 0 1 -1.32 .082l-.095 -.083l-2.793 -2.792l-3.793 3.792a1 1 0 0 1 -1.497 -1.32l.083 -.094l3.792 -3.793l-2.792 -2.793a1 1 0 0 1 -.083 -1.32l.083 -.094l1.5 -1.5a1 1 0 0 1 .258 -.187l.098 -.042l3.796 -1.425l3.171 -3.17a1 1 0 0 1 1.497 -1.26z" stroke-width="0" fill="currentColor"></path>
</svg>

Use an SVG file like the "Host" badge.

Back

When "Show only pinned messages" toggle is changed, change the show_only_pinned value of the presentation_states table and broadcast the change to all (presenter + manager + attendees).

When "Pin"/"Unpin" on Manager is clicked on a message, change the pinned value of a message (posts table)

Database

Add a new column show_only_pinned (bool) to presentation_states table.

Add a new column pinned (bool) to posts table.

@alxlion alxlion converted this from a draft issue Jul 31, 2023
@alxlion alxlion added enhancement New feature or request roadmap Planned for the next release labels Jul 31, 2023
@alxlion alxlion self-assigned this Jul 31, 2023
@alxlion
Copy link
Contributor Author

alxlion commented Oct 19, 2023

/bounty 150

@algora-pbc
Copy link

algora-pbc bot commented Oct 19, 2023

💎 $150 bounty created by alxlion
🙋 If you start working on this, comment /attempt #42 to notify everyone
👉 To claim this bounty, submit a pull request that includes the text /claim #42 somewhere in its body
📝 Before proceeding, please make sure you can receive payouts in your country
💵 Payment arrives in your account 2-5 days after the bounty is rewarded
💯 You keep 100% of the bounty award
🙏 Thank you for contributing to ClaperCo/Claper!

Attempt Started (GMT+0) Solution
🟢 @haruncurak Oct 19, 2023, 12:46:46 PM #62

@haruncurak
Copy link
Contributor

haruncurak commented Oct 19, 2023

Hey @alxlion, I'd love to work on this! I'm wondering if you can provide a bit more details for the bounty before I get going?

From what I understand you'd prefer if the admin has the ability to approve/disapprove each of the messages sent in the live feed so they either show up or don't show up?

I'll attempt it for now as I look into the codebase, hope nobody minds
/attempt #42

Options

@alxlion
Copy link
Contributor Author

alxlion commented Oct 20, 2023

@haruncurak Sorry, I forgot the specs. I edited the first message. I hope it's enough for you, do no hesitate if you have questions and if you have some ideas/improvement to the original specs.

Thanks 🙏

@alxlion alxlion changed the title Approve messages sent by attendees Pin messages sent by attendees Oct 20, 2023
@haruncurak
Copy link
Contributor

Thank you! I'll get to it this afternoon and keep you posted over the weekend -

@haruncurak
Copy link
Contributor

Some updates:

Screenshot 2023-10-22 at 12 04 24 PM Screenshot 2023-10-22 at 12 04 42 PM

Hit a small roadblock since the Messages component in Manage renders according to the phx-update="append" method, but we need phx-update="replace" for pinning messages and putting them up top in real time. Working on that at the moment.

@alxlion
Copy link
Contributor Author

alxlion commented Oct 23, 2023

Great 😊 let me know if you are stuck

@algora-pbc
Copy link

algora-pbc bot commented Oct 26, 2023

💡 @haruncurak submitted a pull request that claims the bounty. You can visit your org dashboard to reward.

@haruncurak
Copy link
Contributor

Hey @alxlion, I've finished up with this issue. Let me know if you would like to add more features moving forward!

It took a bit of extra elbow grease since the phx-update interacts with the socket append() and update() in strange ways at times. I fixed all of that up, and ensured there were no visual bugs when pinning/unpinning. Sharing a quick video here: https://streamable.com/3eaxmy

Thanks!

@alxlion
Copy link
Contributor Author

alxlion commented Oct 26, 2023

Thanks a lot @haruncurak for your submission, nice work!

I will test the PR this weekend to validate the bounty after that.

@alxlion alxlion moved this from Backlog to In Progress in Claper roadmap Oct 29, 2023
@alxlion
Copy link
Contributor Author

alxlion commented Nov 23, 2023

Merged ! Will be on the next release.

@alxlion alxlion closed this as completed Nov 23, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in Claper roadmap Nov 23, 2023
Copy link

algora-pbc bot commented Nov 23, 2023

🎉🎈 @haruncurak has been awarded $150! 🎈🎊

@haruncurak
Copy link
Contributor

Amazing!! Happy to keep contributing -

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💎 Bounty enhancement New feature or request 💰 Rewarded roadmap Planned for the next release
Projects
Status: Done
Development

No branches or pull requests

2 participants