-
Notifications
You must be signed in to change notification settings - Fork 3
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
ISSUE-413: Change post colour based on author's role #461
Conversation
Thank for this! Tested:
Suggestions:
|
@Ammar-T Do you have time to quickly wrap this one up? |
@Ammar-T Do you have a quick moment to wrap this one up? |
…issue-413-change-post-colours
@LunarFang416 Feel free to review when possible. @JoelWiebe As discussed, changed colour constants and will be doing migration in another PR. |
Thanks @Ammar-T, after this has been reviewed, perhaps we can hold off on merging this into develop until the migration PR is also ready to go so that we don't have blank coloured posts. |
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.
LGTM
@Ammar-T What would be involved in the migration? Could we just manually update the values in the DB for the one active run we have going now that uses personal boards? That way we could get this merged in! |
…issue-413-change-post-colours
@JoelWiebe I added the migration script in this PR which sets the appropriate post colors for all boards. But, I haven't actually ran the script for all boards in production/staging yet. I did run it for boards in the project you specified (the link you sent on slack). So, you can check the boards in that project and see that teacher posts are now blue. NOTE: If you move around those posts, the color will change back to yellow since this feature isn't merged into production yet. The only reason the posts are blue is because the script was ran (i.e. the script iterated over all those posts and simply changed their color for now). The reason I haven't ran the script for all projects is because I think we should have some formal process of running migrations. For example, everytime we merge a pull request and there was a new migration added, the migration would run immediately after and keep things stable. The same would be for production. Everytime we create and deploy a production build to Azure, we should run the migrations on the production database to keep things stable there as well. The thing I haven't figured out yet is how to run these migrations during the build stage/after PR merges. It would have to be done via GitHub actions I think, but it needs to be looked into more, so I think it's worth separating into a new issue. I'm not sure if you would like to review this PR one more time before merging so I'll leave it open for now. Or if you have any concerns or questions, we can clear those up before merging, or I can just go ahead and merge. Let me know what you think! |
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.
Perhaps there is some limitation preventing us from doing so, but something to consider for the the future is that we should try to hard set a class rather than hard setting the color for each post. This way we could very easily change the colour of all teacher posts without updating all the colour values stored for each previous posts.
Details
Closes #413