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

Pr/reverse prereq tree #3291

Closed

Conversation

alvynben
Copy link

@alvynben alvynben commented Jun 26, 2021

Context

Fixes #3202

This issue requests the reversal of the orientation of the prerequisite tree in the module page.

Implementation

I have edited moduletree.tsx and moduletree.scss to reverse the order of the prerequisite tree. Then, I changed some of the words used to make the new format clearer. Finally, I updated the snapshots in moduletree.test.tsx to reflect the change in UI.

For a single mod, with no prerequisite or dependant:
image

For mods with only dependants:
image

For mods with one layer of prerequisites and dependants:
image

For mods with two layers of prerequisites:
image

For mods with uneven layers of prerequisites:
image

For mods with uneven letters in prerequisites:
image

Other Information

Hello, I think the code works in most cases that I've managed to test, both on desktop and mobile. However, I feel that there should be a way to 'fix' the uneven nodes featured in the last picture. Do you have any suggestions?

This is my first issue and pull request by the way, so I do apologize for any mistake on my part. Thank you for taking the time to read through it.

@vercel
Copy link

vercel bot commented Jun 26, 2021

@alvynben is attempting to deploy a commit to the NUSMods Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented Jun 26, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

nusmods-export – ./export

🔍 Inspect: https://vercel.com/nusmodifications/nusmods-export/BtZCV5maZPuBTvsZtMiTNS5hCQSb
✅ Preview: https://nusmods-export-git-fork-alvynben-pr-rev-a8429d-nusmodifications.vercel.app

@codecov
Copy link

codecov bot commented Jun 26, 2021

Codecov Report

Merging #3291 (94621fc) into master (1d9f877) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3291   +/-   ##
=======================================
  Coverage   52.89%   52.90%           
=======================================
  Files         270      270           
  Lines        5717     5718    +1     
  Branches     1320     1320           
=======================================
+ Hits         3024     3025    +1     
  Misses       2693     2693           
Impacted Files Coverage Δ
website/src/views/modules/ModuleTree.tsx 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1d9f877...94621fc. Read the comment docs.

@chrisgzf
Copy link
Member

As mentioned in #3202, we'll review #3263 first. Apologies. Closing for now.

@chrisgzf chrisgzf closed this Jun 26, 2021
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.

Prerequisite tree right-to-left progression is confusing
2 participants