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

Added Past Officers data and dropdown to Officers page. #205

Closed
wants to merge 2 commits into from
Closed

Added Past Officers data and dropdown to Officers page. #205

wants to merge 2 commits into from

Conversation

Joelrodiel
Copy link
Contributor

These changes are in response to issue #198 .

image

I saw some conversation of hard coding the data, but wanted to see if reading from an external json would work better.

I ended up creating such a json from scraped data from old website. Because scrapping is always wonky, lmk if there are any mistakes in names/handles.

Then I added a dropdown card with a table of the General & Site Managers for all terms.

I decided to format the json in a way where gms and sms are seperated into their own arrays for human sanity, but that meant a bit of work on run time to reorganize the arrays to work nice with tables. I'm not sure if this is better than just formatting the json to fit with the table format from the get-go, so please let me know.

Still haven't added Deputies or Commitee Heads, so that would be the next step. And then possibly only having handles in the json and then looking up names with ocf.lib functions like in the old website.

@bentref bentref requested review from jyxzhang and bentref June 13, 2021 16:19
@bentref
Copy link
Contributor

bentref commented Jun 13, 2021

I'm about ready to approve this, just a couple suggestions:

  • The behavior of the dropdown arrows is inconsistent--the main one for Past Officers points downward when the dropdown is open, while the term ones point downward when the dropdown is closed. I think that (downward when closed) should be the standard behavior.
  • The Past Officers text should be bigger IMO since it's the heading of the dropdown

Thanks for your work on this, impressive first contribution!

@jyxzhang
Copy link
Contributor

Thanks for your work on this! The design looks good, and reading from a json is definitely a good idea. A better approach might be reading from a schema (basically a config file) (ocf/etc#3), which is something I have been procrastinating on... Your scraped data could definitely be useful for creating the .yaml for the schema and finishing it up. Feel free to give any thoughts or suggestions on the schema, as it is pretty new to me.

@Joelrodiel
Copy link
Contributor Author

Joelrodiel commented Jun 15, 2021

Hey @bentref, thanks for the great review. Completely agree with the design fixes, and I pushed the fixes to the new commit. This is what it would look like now:

image

Hey @jyxzhang, I hadn't heard of schemas before, and had only touched yaml files with a hazard suit on, but I am intrigued. I'll check it out and see how to implement it. If you have any suggestions on how to, I would love to talk!

@bentref
Copy link
Contributor

bentref commented Jun 15, 2021

Awesome! This looks good to me, and I'm ready to approve it other than the failed continuous-integration/jenkins/pr-merge check--not really sure what that means, but I do want to try to resolve it before merging into master.

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.

3 participants