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
Export company interests to csv #3664
Conversation
6d18564
to
5e3b57b
Compare
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.
Looks good 💯
Most importantly just change the company interest action.
5e3b57b
to
230c7e5
Compare
230c7e5
to
92ad4f5
Compare
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.
These comments are mostly knitpickery, so see if you want to do anything about it - the remaining comments from the others seem more important:)
d754891
to
3780ce0
Compare
3780ce0
to
2f8486a
Compare
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.
Love the added tooltip 😍 LGTM^^
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.
The only major thing I would comment on is to use replace
rather than push
. It makes the user experience a lot better.
Other than that it looks really good now 👌
filename: `company-interests-${this.props.selectedSemesterOption.year}-${ | ||
this.props.selectedSemesterOption.semester | ||
}${ | ||
this.props.selectedEventOption.value | ||
? `-${this.props.selectedEventOption.value}` | ||
: '' | ||
}.csv`, |
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.
Don't you already create the filename in the backend? Why not use that instead here?
Not a huge deal but just a bit unnecessary
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.
Truthfully, I didn't really understand the point of having it in the back-end. U have to have this here in the front-end for the purpose of changing url blobs.
) : ( | ||
<Tooltip | ||
style={ | ||
this.props.selectedSemesterOption.year && { display: 'none' } |
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 feel like adding a display: none
isn't very "reacty". Just use !this.props.selectedSemesterOption.year
to determine if the JSX should be rendered.
{!this.props.selectedSemesterOption.year && (
<Tooltip>
...
</Tooltip>
)
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.
But that would remove the children when the predicate is false. How would you avoid that
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 fixed it. Not sure if this way is better though
2f8486a
to
763e5a6
Compare
) : !this.props.selectedSemesterOption.year ? ( | ||
<Tooltip content={'Vennligst velg semester'}> | ||
<this.EportButton /> | ||
</Tooltip> | ||
) : ( | ||
<this.EportButton /> | ||
)} |
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 don't get it 🤔. It tells you to select a semester but you can still click the button right? I'm confused, what's the idea here? 😅
PS: EportButton
-> ExportButton
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.
The button isn't clickable when the tooltip is showing.
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.
Ah I see now.
I get @ivarnakken's point, but if this is the alternative than I'm pretty sure we all agree the previous solution was better 🙃
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.
Done
763e5a6
to
996cdb6
Compare
996cdb6
to
89a4a5f
Compare
Description
Result
# Testing