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

ISSUE-413: Change post colour based on author's role #461

Merged
merged 12 commits into from
Jan 26, 2024

Conversation

Ammar-T
Copy link
Contributor

@Ammar-T Ammar-T commented Dec 24, 2022

Details

  • Assign yellow background to student posts and blue background to teacher posts.
  • Implemented for all posts across canvas, list view, bucket view and workspace view.

Closes #413

@JoelWiebe
Copy link
Contributor

Thank for this!

Tested:

  • Teachers' posts in personal board, community board, list view, buckets, and workspace should all be coloured blue
  • Students' posts should remain, original yellow in all contexts

Suggestions:

  • Can we have old teachers' posts displayed in new blue (to support previous projects)? I notice that while new teacher posts are displayed in blue old posts in the list view and workspace have no background colour
  • Can we update the original yellow to rgb(255, 230, 120) and new blue to rgb(40, 200, 255)?

Screen Shot 2022-12-28 at 1 51 53 PM

@JoelWiebe JoelWiebe self-requested a review January 2, 2023 00:58
@JoelWiebe
Copy link
Contributor

JoelWiebe commented Jan 10, 2023

@Ammar-T Do you have time to quickly wrap this one up?
@LunarFang416 Would you mind reviewing this one once it's complete?

@JoelWiebe
Copy link
Contributor

@Ammar-T Do you have a quick moment to wrap this one up?

@Ammar-T
Copy link
Contributor Author

Ammar-T commented Jan 17, 2023

@LunarFang416 Feel free to review when possible.

@JoelWiebe As discussed, changed colour constants and will be doing migration in another PR.

@JoelWiebe
Copy link
Contributor

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.

Copy link
Contributor

@LunarFang416 LunarFang416 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@JoelWiebe
Copy link
Contributor

@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!

@Ammar-T
Copy link
Contributor Author

Ammar-T commented Apr 28, 2023

@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!

Copy link
Contributor

@JoelWiebe JoelWiebe left a 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.

@JoelWiebe JoelWiebe merged commit 0ea2253 into develop Jan 26, 2024
2 checks passed
@JoelWiebe JoelWiebe deleted the issue-413-change-post-colours branch January 26, 2024 18:42
@JoelWiebe JoelWiebe restored the issue-413-change-post-colours branch January 26, 2024 19:41
@JoelWiebe JoelWiebe deleted the issue-413-change-post-colours branch January 26, 2024 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change teacher post colour for personal boards
3 participants