joemasilotti/railsdevs.com

Extend an (unofficial) offer

Closed this issue · 13 comments

I'd love for businesses to be able to extend unofficial offers to developers right inside of RailsDevs.

To me, an unofficial offer includes the start date, compensation package, title, and a freeform comment/notes field. This should be enough for the developer to a) get excited and b) decide if they want to move forward or start negotiating.

And by keeping this information inside of RailsDevs I will be able to help developers navigate those negotiations.

A PR addressing this issue should:

  • Add a button to the conversation screen for businesses to "Extend an offer"
  • Present a new screen with the above fields noting that the offer is unofficial and only used to gauge interest from the developer - but also that they should follow through if accepted
  • When submitted, present a different conversation element (and new notification) with the offer details
  • Add two buttons - Accept and Reject - for the developer to respond to the offer
  • Present the response (and new notification) in the UI

I usually pull my designs from Tailwind UI. If you can't find something there or in the existing code then feel free to throw me unstyled HTML. And I'll take it from there!

I could give it a try, It may be a longer PR tho.

It would be my first-ever open source assignment, If you @joemasilotti are okay with that, I can start coding it.

Excellent! All yours.

Let me know if you have any questions or get stuck. If I don't hear from you in a week I'll reach out.

Hello there!

Here's a small update on the feature. I'm 70% done with the prototype, please let me know what do you think.
Is it what you meant to have?

image
image

This is looking great so far! A recent PR was merged in that put a similar button on this UI. If you can move yours next to the "Schedule a call" button that would be great.

@joemasilotti I'm wondering about the new conversation element part.

Maybe for now we would always display offer as the last element in the conversation? We could create another issue for making the offers display between messages (in chronological order) by using some custom collection / polymorphic association?

Great question! Displaying the offer as the last item sounds great for now.

There could be multiple offers If the developer rejects a few in a row. I'll try to figure out how to place them.

As for now I see many similarities to messages, so I think I'd refactor it into polymorphic association at some point.

Hmm. How much of the code would we have to rip out to refactor? I’m wondering if it makes sense to do now.

I'd need to add some model between Conversation and Message (and the Offer model which I created), so Conversation would has_many :messages, as: :conversable.

Then we could move all the things that are not specific to Message, but also apply to the Offer to Conservable (views/conversable, maybe mailers/message_mailer and maybe some other stuff).

I'd like to finish this feature first and then refactor/improve it. Maybe there are some other ways to put Offers and Messages in the one collection so they can be sorted together by send date 🤔

Sounds good - let’s refactor later. And make sure the button is behind a feature flag.

@joemasilotti I prepared the pr with the initial version of this feature #851, let me know what do you think 😄

Is there any task u can assign to me ?