Skip to content

Rename things called "room" to "location" to reflect current data#1687

Open
Purplegaze wants to merge 2 commits intoCourseography:masterfrom
Purplegaze:de-roomify
Open

Rename things called "room" to "location" to reflect current data#1687
Purplegaze wants to merge 2 commits intoCourseography:masterfrom
Purplegaze:de-roomify

Conversation

@Purplegaze
Copy link
Copy Markdown
Contributor

Proposed Changes

Renames most instances of things called "room" to use the word "location" instead. This better reflects the current data stored in the timetable, which no longer includes room numbers. I think "location" makes sense as a word here over something like "building", because a meeting time is not necessarily situated inside a building (e.g. online synchronous courses.)

Things that were changed:

  • Data fields for Times, Time', and Time datatypes
  • Front-end calendar datatypes (firstRoom, fstRoom, etc.)
  • The timetable display columns
  • The function getRoomStr in react_modal.js
  • Any tests that expected these datatypes to be named

Things that have NOT been changed:

  • The FromJSON instance for the Time' datatype
    • This currently uses very outdated fields (e.g. assignedRoom2, which does not exist in the timetable JSON response anymore), and may be connected to a bug where year-long courses are not included in the database. This definitely seems like something that warrants its own PR, and I need to learn more about the database to explore this further.
  • The Map modal in the front-end
    • Again, this uses an outdated room field. I'm not sure what feature of the website this is as I can't find any working maps in Courseography, so I didn't touch it (aside from where it used the aforementioned datatypes that I renamed)

...

Screenshots of your changes (if applicable) The only visual change is that this column in the course modal now says "Location" instead of "Room". image

Type of Change

(Write an X or a brief description next to the type or types that best describe your changes.)

Type Applies?
🚨 Breaking change (fix or feature that would cause existing functionality to change)
New feature (non-breaking change that adds functionality)
🐛 Bug fix (non-breaking change that fixes an issue)
🎨 User interface change (change to user interface; provide screenshots)
♻️ Refactoring (internal change to codebase, without changing functionality) X
🚦 Test update (change that only adds or modifies tests)
📦 Dependency update (change that updates a dependency)
🔧 Internal (change that only affects developers or continuous integration)

Checklist

(Complete each of the following items for your pull request. Indicate that you have completed an item by changing the [ ] into a [x] in the raw text, or by clicking on the checkbox in the rendered description on GitHub.)

Before opening your pull request:

  • I have performed a self-review of my changes.
    • Check that all changed files included in this pull request are intentional changes.
    • Check that all changes are relevant to the purpose of this pull request, as described above.
  • I have added tests for my changes, if applicable.
    • This is required for all bug fixes and new features.
  • I have updated the project documentation, if applicable.
    • This is required for new features.
  • If this is my first contribution, I have added myself to the list of contributors.
  • I have updated the project Changelog (this is required for all changes).

After opening your pull request:

  • I have verified that the CircleCI checks have passed.
  • I have requested a review from a project maintainer.

Questions and Comments

Would like some clarification on what the MapModal is and if I should be trying to fix it somehow.

@coveralls
Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 32b1a43c-35a3-400a-8d58-85400bbeaabb

Details

  • 19 of 35 (54.29%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 57.408%

Changes Missing Coverage Covered Lines Changed/Added Lines %
app/Database/Tables.hs 6 8 75.0%
js/components/common/react_modal.js.jsx 13 27 48.15%
Totals Coverage Status
Change from base Build d1bce827-5d0e-4612-9b73-f43cfc0eaed9: 0.0%
Covered Lines: 2316
Relevant Lines: 3943

💛 - Coveralls

Copy link
Copy Markdown
Contributor

@david-yz-liu david-yz-liu left a comment

Choose a reason for hiding this comment

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

Overall the changes are good, I just left one comment clarifying the scope of this PR.

meeting MeetingId
firstRoom T.Text Maybe
secondRoom T.Text Maybe
firstLocation T.Text Maybe
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You should not make changes directly to the table schema itself without making a migration. I think that's a bit larger of a task, so for now please revert changes to the Times data type (but you can keep changes to the Time and Time' data types).

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