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

feat: Working triptych app skeleton with viewport shifter, request logging, packaging instructions #1833

Merged
merged 32 commits into from
Aug 30, 2023

Conversation

jzimbel-mbta
Copy link
Member

@jzimbel-mbta jzimbel-mbta commented Aug 11, 2023

Asana task: Get basic triptych app working & set up packaging for OF process

This ended up being a bit of a snowball of changes—I needed to add some new frontend and backend code to support how we plan to identify individual triptych panes based on their player names.

The diff is huge, but it's almost all from straightforward refactors I did to make working on the OFM client apps less error-prone.

Summary of changes since the first round of reviews

Triptych player name mapping config

The server now expects us to maintain a mapping from triptych player name to screen ID in a config file.

Implementation is identical to that of the main screen config—we use a local JSON file in priv/ for local development, and per-environment files in S3 for deployment environments. The mapping is cached on the server, and can be accessed with functions in Screens.TriptychPlayer.State.

This required a terraform change to add permission for the new file in S3. Link to relevant PR

Triptych API endpoint

A new API endpoint: /v2/screen/:player_name/triptych.

The triptych client app uses this endpoint when running in a standalone package.

It maps the player name to a screen ID using the new config, then runs identical logic to all other screen types.

Determine pane from MRAID tags

The triptych client now determines which pane of the trio it is via the Array_configuration MRAID tag.


☝️ ^ The above 3 changes ^ collectively mean that we only need to package one triptych app now! (Not 3)


Improved common OFM functions

Utility functions related to OFM stuff have been collected in Util/outfront.tsx and Hooks/outfront.tsx, and cleaned up.

The OFM hooks no longer use state or effects—just a memoized function call. This is because the values in the MRAID object are not expected to change. By using useMemo instead of useState + useEffect, we don't need to worry about handling an "initial" value like null on the first render, as well as the real value in subsequent renders. useMemo returns the real value synchronously on the first render.

Package testing improvements

Fake MRAID object

The process for testing packaged DUP/triptych apps locally is now closer to how they work on real OFM screens.

You can call a function to set up a fake MRAID object that matches the interface of the real one.

Improved debug element

Improved the on-screen debug element for OFM clients. Newest lines now appear first so that relevant info doesn't scroll out of view after the first couple renders.

Screenshots

left

image

middle

image

right

image
  • Tests added?

@jzimbel-mbta jzimbel-mbta changed the title Jz/triptych packaging feat: Working triptych app skeleton with viewport shifter, request logging, packaging instructions Aug 11, 2023
@github-actions
Copy link

Coverage of commit 83dbcfb

Summary coverage rate:
  lines......: 40.9% (2230 of 5449 lines)
  functions..: 42.1% (1015 of 2412 functions)
  branches...: no data found

Files changed coverage rate:
                                                                           |Lines       |Functions  |Branches    
  Filename                                                                 |Rate     Num|Rate    Num|Rate     Num
  ===============================================================================================================
  lib/screens/log_screen_data.ex                                           | 4.4%     45|10.5%    19|    -      0
  lib/screens/util.ex                                                      |65.0%     60|75.0%    16|    -      0
  lib/screens/v2/candidate_generator/triptych.ex                           | 0.0%      7| 0.0%     5|    -      0
  lib/screens_web/controllers/v2/screen_api_controller.ex                  | 0.0%     37| 0.0%    13|    -      0
  lib/screens_web/controllers/v2/screen_controller.ex                      |51.1%     47|78.9%    19|    -      0
  lib/screens_web/router.ex                                                |38.5%     39|33.8%    74|    -      0

Download coverage report

@github-actions
Copy link

Coverage of commit 83dbcfb

Summary coverage rate:
  lines......: 40.9% (2230 of 5449 lines)
  functions..: 42.1% (1015 of 2412 functions)
  branches...: no data found

Files changed coverage rate:
                                                                           |Lines       |Functions  |Branches    
  Filename                                                                 |Rate     Num|Rate    Num|Rate     Num
  ===============================================================================================================
  lib/screens/log_screen_data.ex                                           | 4.4%     45|10.5%    19|    -      0
  lib/screens/util.ex                                                      |65.0%     60|75.0%    16|    -      0
  lib/screens/v2/candidate_generator/triptych.ex                           | 0.0%      7| 0.0%     5|    -      0
  lib/screens_web/controllers/v2/screen_api_controller.ex                  | 0.0%     37| 0.0%    13|    -      0
  lib/screens_web/controllers/v2/screen_controller.ex                      |51.1%     47|78.9%    19|    -      0
  lib/screens_web/router.ex                                                |38.5%     39|33.8%    74|    -      0

Download coverage report

Copy link
Contributor

@hannahpurcell hannahpurcell left a comment

Choose a reason for hiding this comment

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

A lot of the layout components + CSS were stubbed out, which I didn't expect. I knew we'll need to do them eventually, but I figured the packaging step was primarily to get the bare bones app exported, even if it was just the blank screen with slot_names. (But perhaps Paul expected the placeholders like you did. Maybe a boring screen would have been a waste of Outfront's time.) Couple notes to get us started, while Outfront looks at the app

assets/css/v2/triptych/screen/takeover.scss Outdated Show resolved Hide resolved
assets/src/apps/v2/triptych.tsx Outdated Show resolved Hide resolved
assets/src/components/v2/triptych/no_data.tsx Show resolved Hide resolved
assets/src/hooks/v2/use_api_response.tsx Outdated Show resolved Hide resolved
lib/screens/log_screen_data.ex Show resolved Hide resolved
@jzimbel-mbta jzimbel-mbta temporarily deployed to dev-green August 11, 2023 20:20 — with GitHub Actions Inactive
@github-actions
Copy link

Coverage of commit 7182494

Summary coverage rate:
  lines......: 40.9% (2230 of 5449 lines)
  functions..: 42.1% (1015 of 2412 functions)
  branches...: no data found

Files changed coverage rate:
                                                                           |Lines       |Functions  |Branches    
  Filename                                                                 |Rate     Num|Rate    Num|Rate     Num
  ===============================================================================================================
  lib/screens/log_screen_data.ex                                           | 4.4%     45|10.5%    19|    -      0
  lib/screens/util.ex                                                      |65.0%     60|75.0%    16|    -      0
  lib/screens/v2/candidate_generator/triptych.ex                           | 0.0%      7| 0.0%     5|    -      0
  lib/screens_web/controllers/v2/screen_api_controller.ex                  | 0.0%     37| 0.0%    13|    -      0
  lib/screens_web/controllers/v2/screen_controller.ex                      |51.1%     47|78.9%    19|    -      0
  lib/screens_web/router.ex                                                |38.5%     39|33.8%    74|    -      0

Download coverage report

assets/src/util/util.tsx Outdated Show resolved Hide resolved
@github-actions
Copy link

Coverage of commit 99c181a

Summary coverage rate:
  lines......: 41.0% (2284 of 5574 lines)
  functions..: 42.2% (1044 of 2472 functions)
  branches...: no data found

Files changed coverage rate:
                                                                           |Lines       |Functions  |Branches    
  Filename                                                                 |Rate     Num|Rate    Num|Rate     Num
  ===============================================================================================================
  lib/screens/application.ex                                               |75.0%      4|50.0%     2|    -      0
  lib/screens/log_screen_data.ex                                           | 4.4%     45|10.5%    19|    -      0
  lib/screens/triptych_player.ex                                           | 0.0%      2| 0.0%     2|    -      0
  lib/screens/triptych_player/state.ex                                     | 8.3%     12|16.7%    18|    -      0
  lib/screens/triptych_player/state/local_fetch.ex                         |83.3%      6| 100%     2|    -      0
  lib/screens/triptych_player/state/s3_fetch.ex                            | 0.0%     17| 0.0%     4|    -      0
  lib/screens/triptych_player/state/supervisor.ex                          | 100%      3| 100%     2|    -      0
  lib/screens/util.ex                                                      |65.0%     60|75.0%    16|    -      0
  lib/screens_web/controllers/v2/screen_api_controller.ex                  | 0.0%     40| 0.0%    14|    -      0
  lib/screens_web/controllers/v2/screen_controller.ex                      |51.1%     47|78.9%    19|    -      0
  lib/screens_web/router.ex                                                |37.5%     40|33.8%    74|    -      0

Download coverage report

Copy link
Contributor

@hannahpurcell hannahpurcell left a comment

Choose a reason for hiding this comment

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

Not much, but couple o' items (unrelated to the upcoming merge resolution)

@@ -37,7 +37,7 @@ const ScreenPage = ({
}: {
screenContainer: React.ComponentType;
}): JSX.Element =>
isDup() ? (
isDUP() ? (
Copy link
Contributor

Choose a reason for hiding this comment

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

I have mixed feelings about updating anything for DUP v1 (though maybe this update was needed to compile?)

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, my bad, this is an artifact of my initially merging the check into a new isOFM function, and then needing to go back and have separate isDUP and isTriptych functions. In the process I accidentally renamed the original isDup to isDUP. 😵‍💫

I'll restore this function's original name.

Copy link
Contributor

Choose a reason for hiding this comment

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

I checked the latest updates, and it still looks like the changes are there, so we might be talking about different things.

Since this is a DUP v1 file, I'm wondering why the change to the function name needed to be made? We don't have any DUP v1s in the world anymore and I'm not concerned about keeping it maintained, but maybe that's a philosophically bad approach?

lib/screens/application.ex Outdated Show resolved Hide resolved
assets/src/util/outfront.tsx Outdated Show resolved Hide resolved
@github-actions
Copy link

Coverage of commit 4189456

Summary coverage rate:
  lines......: 41.0% (2287 of 5574 lines)
  functions..: 42.4% (1047 of 2472 functions)
  branches...: no data found

Files changed coverage rate:
                                                                           |Lines       |Functions  |Branches    
  Filename                                                                 |Rate     Num|Rate    Num|Rate     Num
  ===============================================================================================================
  lib/screens/application.ex                                               |75.0%      4|50.0%     2|    -      0
  lib/screens/log_screen_data.ex                                           | 4.4%     45|10.5%    19|    -      0
  lib/screens/triptych_player.ex                                           | 0.0%      2| 0.0%     2|    -      0
  lib/screens/triptych_player/state.ex                                     | 8.3%     12|16.7%    18|    -      0
  lib/screens/triptych_player/state/local_fetch.ex                         |83.3%      6| 100%     2|    -      0
  lib/screens/triptych_player/state/s3_fetch.ex                            | 0.0%     17| 0.0%     4|    -      0
  lib/screens/triptych_player/state/supervisor.ex                          | 100%      3| 100%     2|    -      0
  lib/screens/util.ex                                                      |65.0%     60|75.0%    16|    -      0
  lib/screens_web/controllers/v2/screen_api_controller.ex                  | 0.0%     40| 0.0%    14|    -      0
  lib/screens_web/controllers/v2/screen_controller.ex                      |51.1%     47|78.9%    19|    -      0
  lib/screens_web/router.ex                                                |37.5%     40|33.8%    74|    -      0

Download coverage report

@github-actions
Copy link

Coverage of commit 4189456

Summary coverage rate:
  lines......: 41.0% (2287 of 5574 lines)
  functions..: 42.4% (1047 of 2472 functions)
  branches...: no data found

Files changed coverage rate:
                                                                           |Lines       |Functions  |Branches    
  Filename                                                                 |Rate     Num|Rate    Num|Rate     Num
  ===============================================================================================================
  lib/screens/application.ex                                               |75.0%      4|50.0%     2|    -      0
  lib/screens/log_screen_data.ex                                           | 4.4%     45|10.5%    19|    -      0
  lib/screens/triptych_player.ex                                           | 0.0%      2| 0.0%     2|    -      0
  lib/screens/triptych_player/state.ex                                     | 8.3%     12|16.7%    18|    -      0
  lib/screens/triptych_player/state/local_fetch.ex                         |83.3%      6| 100%     2|    -      0
  lib/screens/triptych_player/state/s3_fetch.ex                            | 0.0%     17| 0.0%     4|    -      0
  lib/screens/triptych_player/state/supervisor.ex                          | 100%      3| 100%     2|    -      0
  lib/screens/util.ex                                                      |65.0%     60|75.0%    16|    -      0
  lib/screens_web/controllers/v2/screen_api_controller.ex                  | 0.0%     40| 0.0%    14|    -      0
  lib/screens_web/controllers/v2/screen_controller.ex                      |51.1%     47|78.9%    19|    -      0
  lib/screens_web/router.ex                                                |37.5%     40|33.8%    74|    -      0

Download coverage report

@github-actions
Copy link

Coverage of commit f995910

Summary coverage rate:
  lines......: 41.0% (2287 of 5574 lines)
  functions..: 42.4% (1047 of 2472 functions)
  branches...: no data found

Files changed coverage rate:
                                                                           |Lines       |Functions  |Branches    
  Filename                                                                 |Rate     Num|Rate    Num|Rate     Num
  ===============================================================================================================
  lib/screens/application.ex                                               |75.0%      4|50.0%     2|    -      0
  lib/screens/config/v2/train_crowding.ex                                  |20.0%      5|50.0%     4|    -      0
  lib/screens/log_screen_data.ex                                           | 4.4%     45|10.5%    19|    -      0
  lib/screens/triptych_player.ex                                           | 0.0%      2| 0.0%     2|    -      0
  lib/screens/triptych_player/state.ex                                     | 8.3%     12|16.7%    18|    -      0
  lib/screens/triptych_player/state/local_fetch.ex                         |83.3%      6| 100%     2|    -      0
  lib/screens/triptych_player/state/s3_fetch.ex                            | 0.0%     17| 0.0%     4|    -      0
  lib/screens/triptych_player/state/supervisor.ex                          | 100%      3| 100%     2|    -      0
  lib/screens/util.ex                                                      |65.0%     60|75.0%    16|    -      0
  lib/screens/v2/candidate_generator/triptych.ex                           |10.0%     10|16.7%     6|    -      0
  lib/screens/v2/widget_instance/train_crowding.ex                         |66.7%     33|93.3%    15|    -      0
  lib/screens_web/controllers/v2/screen_api_controller.ex                  | 0.0%     40| 0.0%    14|    -      0
  lib/screens_web/controllers/v2/screen_controller.ex                      |51.1%     47|78.9%    19|    -      0
  lib/screens_web/router.ex                                                |37.5%     40|33.8%    74|    -      0

Download coverage report

@github-actions
Copy link

Coverage of commit e9c6a03

Summary coverage rate:
  lines......: 41.0% (2287 of 5574 lines)
  functions..: 42.4% (1047 of 2472 functions)
  branches...: no data found

Files changed coverage rate:
                                                                           |Lines       |Functions  |Branches    
  Filename                                                                 |Rate     Num|Rate    Num|Rate     Num
  ===============================================================================================================
  lib/screens/application.ex                                               |75.0%      4|50.0%     2|    -      0
  lib/screens/config/v2/train_crowding.ex                                  |20.0%      5|50.0%     4|    -      0
  lib/screens/log_screen_data.ex                                           | 4.4%     45|10.5%    19|    -      0
  lib/screens/triptych_player.ex                                           | 0.0%      2| 0.0%     2|    -      0
  lib/screens/triptych_player/state.ex                                     | 8.3%     12|16.7%    18|    -      0
  lib/screens/triptych_player/state/local_fetch.ex                         |83.3%      6| 100%     2|    -      0
  lib/screens/triptych_player/state/s3_fetch.ex                            | 0.0%     17| 0.0%     4|    -      0
  lib/screens/triptych_player/state/supervisor.ex                          | 100%      3| 100%     2|    -      0
  lib/screens/util.ex                                                      |65.0%     60|75.0%    16|    -      0
  lib/screens/v2/candidate_generator/triptych.ex                           |10.0%     10|16.7%     6|    -      0
  lib/screens/v2/widget_instance/train_crowding.ex                         |66.7%     33|93.3%    15|    -      0
  lib/screens_web/controllers/v2/screen_api_controller.ex                  | 0.0%     40| 0.0%    14|    -      0
  lib/screens_web/controllers/v2/screen_controller.ex                      |51.1%     47|78.9%    19|    -      0
  lib/screens_web/router.ex                                                |37.5%     40|33.8%    74|    -      0

Download coverage report

@github-actions
Copy link

Coverage of commit 1005d8b

Summary coverage rate:
  lines......: 41.0% (2287 of 5574 lines)
  functions..: 42.4% (1047 of 2472 functions)
  branches...: no data found

Files changed coverage rate:
                                                                           |Lines       |Functions  |Branches    
  Filename                                                                 |Rate     Num|Rate    Num|Rate     Num
  ===============================================================================================================
  lib/screens/application.ex                                               |75.0%      4|50.0%     2|    -      0
  lib/screens/config/v2/train_crowding.ex                                  |20.0%      5|50.0%     4|    -      0
  lib/screens/log_screen_data.ex                                           | 4.4%     45|10.5%    19|    -      0
  lib/screens/triptych_player.ex                                           | 0.0%      2| 0.0%     2|    -      0
  lib/screens/triptych_player/state.ex                                     | 8.3%     12|16.7%    18|    -      0
  lib/screens/triptych_player/state/local_fetch.ex                         |83.3%      6| 100%     2|    -      0
  lib/screens/triptych_player/state/s3_fetch.ex                            | 0.0%     17| 0.0%     4|    -      0
  lib/screens/triptych_player/state/supervisor.ex                          | 100%      3| 100%     2|    -      0
  lib/screens/util.ex                                                      |65.0%     60|75.0%    16|    -      0
  lib/screens/v2/candidate_generator/triptych.ex                           |10.0%     10|16.7%     6|    -      0
  lib/screens/v2/widget_instance/train_crowding.ex                         |66.7%     33|93.3%    15|    -      0
  lib/screens_web/controllers/v2/screen_api_controller.ex                  | 0.0%     40| 0.0%    14|    -      0
  lib/screens_web/controllers/v2/screen_controller.ex                      |51.1%     47|78.9%    19|    -      0
  lib/screens_web/router.ex                                                |37.5%     40|33.8%    74|    -      0

Download coverage report

@github-actions
Copy link

Coverage of commit 1005d8b

Summary coverage rate:
  lines......: 41.0% (2287 of 5574 lines)
  functions..: 42.4% (1047 of 2472 functions)
  branches...: no data found

Files changed coverage rate:
                                                                           |Lines       |Functions  |Branches    
  Filename                                                                 |Rate     Num|Rate    Num|Rate     Num
  ===============================================================================================================
  lib/screens/application.ex                                               |75.0%      4|50.0%     2|    -      0
  lib/screens/config/v2/train_crowding.ex                                  |20.0%      5|50.0%     4|    -      0
  lib/screens/log_screen_data.ex                                           | 4.4%     45|10.5%    19|    -      0
  lib/screens/triptych_player.ex                                           | 0.0%      2| 0.0%     2|    -      0
  lib/screens/triptych_player/state.ex                                     | 8.3%     12|16.7%    18|    -      0
  lib/screens/triptych_player/state/local_fetch.ex                         |83.3%      6| 100%     2|    -      0
  lib/screens/triptych_player/state/s3_fetch.ex                            | 0.0%     17| 0.0%     4|    -      0
  lib/screens/triptych_player/state/supervisor.ex                          | 100%      3| 100%     2|    -      0
  lib/screens/util.ex                                                      |65.0%     60|75.0%    16|    -      0
  lib/screens/v2/candidate_generator/triptych.ex                           |10.0%     10|16.7%     6|    -      0
  lib/screens/v2/widget_instance/train_crowding.ex                         |66.7%     33|93.3%    15|    -      0
  lib/screens_web/controllers/v2/screen_api_controller.ex                  | 0.0%     40| 0.0%    14|    -      0
  lib/screens_web/controllers/v2/screen_controller.ex                      |51.1%     47|78.9%    19|    -      0
  lib/screens_web/router.ex                                                |37.5%     40|33.8%    74|    -      0

Download coverage report

@github-actions
Copy link

Coverage of commit f266e7c

Summary coverage rate:
  lines......: 41.0% (2287 of 5574 lines)
  functions..: 42.4% (1047 of 2472 functions)
  branches...: no data found

Files changed coverage rate:
                                                                           |Lines       |Functions  |Branches    
  Filename                                                                 |Rate     Num|Rate    Num|Rate     Num
  ===============================================================================================================
  lib/screens/application.ex                                               |75.0%      4|50.0%     2|    -      0
  lib/screens/config/v2/train_crowding.ex                                  |20.0%      5|50.0%     4|    -      0
  lib/screens/log_screen_data.ex                                           | 4.4%     45|10.5%    19|    -      0
  lib/screens/triptych_player.ex                                           | 0.0%      2| 0.0%     2|    -      0
  lib/screens/triptych_player/state.ex                                     | 8.3%     12|16.7%    18|    -      0
  lib/screens/triptych_player/state/local_fetch.ex                         |83.3%      6| 100%     2|    -      0
  lib/screens/triptych_player/state/s3_fetch.ex                            | 0.0%     17| 0.0%     4|    -      0
  lib/screens/triptych_player/state/supervisor.ex                          | 100%      3| 100%     2|    -      0
  lib/screens/util.ex                                                      |65.0%     60|75.0%    16|    -      0
  lib/screens/v2/candidate_generator/triptych.ex                           |10.0%     10|16.7%     6|    -      0
  lib/screens/v2/widget_instance/train_crowding.ex                         |66.7%     33|93.3%    15|    -      0
  lib/screens_web/controllers/v2/screen_api_controller.ex                  | 0.0%     40| 0.0%    14|    -      0
  lib/screens_web/controllers/v2/screen_controller.ex                      |51.1%     47|78.9%    19|    -      0
  lib/screens_web/router.ex                                                |37.5%     40|33.8%    74|    -      0

Download coverage report

@github-actions
Copy link

Coverage of commit f266e7c

Summary coverage rate:
  lines......: 41.0% (2287 of 5574 lines)
  functions..: 42.4% (1047 of 2472 functions)
  branches...: no data found

Files changed coverage rate:
                                                                           |Lines       |Functions  |Branches    
  Filename                                                                 |Rate     Num|Rate    Num|Rate     Num
  ===============================================================================================================
  lib/screens/application.ex                                               |75.0%      4|50.0%     2|    -      0
  lib/screens/config/v2/train_crowding.ex                                  |20.0%      5|50.0%     4|    -      0
  lib/screens/log_screen_data.ex                                           | 4.4%     45|10.5%    19|    -      0
  lib/screens/triptych_player.ex                                           | 0.0%      2| 0.0%     2|    -      0
  lib/screens/triptych_player/state.ex                                     | 8.3%     12|16.7%    18|    -      0
  lib/screens/triptych_player/state/local_fetch.ex                         |83.3%      6| 100%     2|    -      0
  lib/screens/triptych_player/state/s3_fetch.ex                            | 0.0%     17| 0.0%     4|    -      0
  lib/screens/triptych_player/state/supervisor.ex                          | 100%      3| 100%     2|    -      0
  lib/screens/util.ex                                                      |65.0%     60|75.0%    16|    -      0
  lib/screens/v2/candidate_generator/triptych.ex                           |10.0%     10|16.7%     6|    -      0
  lib/screens/v2/widget_instance/train_crowding.ex                         |66.7%     33|93.3%    15|    -      0
  lib/screens_web/controllers/v2/screen_api_controller.ex                  | 0.0%     40| 0.0%    14|    -      0
  lib/screens_web/controllers/v2/screen_controller.ex                      |51.1%     47|78.9%    19|    -      0
  lib/screens_web/router.ex                                                |37.5%     40|33.8%    74|    -      0

Download coverage report

Copy link
Contributor

@hannahpurcell hannahpurcell left a comment

Choose a reason for hiding this comment

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

Great!! I think this is ready. Two non-blocking comments

Comment on lines +37 to +40
// No-data states
@import "v2/lcd_common_styles/page_load_no_data";
@import "v2/lcd_common_styles/no_data";
@import "v2/triptych/no_data";
Copy link
Contributor

Choose a reason for hiding this comment

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

I'll try to get this reviewed / merged before the no-data branch. It's possible these may / may not be needed depending on the implementation of that, but we can leave that for the no-data pr to resolve.

@@ -37,7 +37,7 @@ const ScreenPage = ({
}: {
screenContainer: React.ComponentType;
}): JSX.Element =>
isDup() ? (
isDUP() ? (
Copy link
Contributor

Choose a reason for hiding this comment

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

I checked the latest updates, and it still looks like the changes are there, so we might be talking about different things.

Since this is a DUP v1 file, I'm wondering why the change to the function name needed to be made? We don't have any DUP v1s in the world anymore and I'm not concerned about keeping it maintained, but maybe that's a philosophically bad approach?

@@ -17,7 +17,7 @@ import {
MultiRotationPage,
SimulationPage,
} from "Components/dup/dup_screen_page";
import { isDup } from "Util/util";
import { isDup } from "Util/outfront";
Copy link
Contributor

Choose a reason for hiding this comment

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

I unresolved a previous comment thread to ask about this in better detail. (Just noting here so you don't miss it.)

Copy link
Member Author

@jzimbel-mbta jzimbel-mbta Aug 30, 2023

Choose a reason for hiding this comment

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

Yeah, if I hadn't updated this and other references to isDup in the old code, I think the code would fail to compile or at least print some warnings to the console even though we don't have any screens configured to use that app bundle anymore.

The real reason it's updated though, is simply that it's easier to do so. I used the vscode refactor function (F2) to rename the function as well as automatically update all references to it. It would have been harder to go back afterward and undo the renames in the old files.

Copy link
Contributor

Choose a reason for hiding this comment

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

The real reason it's updated though, is simply that it's easier to do so. I used the vscode refactor function (F2)

Love it! That's a great reason.

@jzimbel-mbta jzimbel-mbta merged commit 0c1e7b0 into master Aug 30, 2023
@jzimbel-mbta jzimbel-mbta deleted the jz/triptych-packaging branch August 30, 2023 17:53
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