react-native-community / upgrade-helper

⚛️ A web tool to support React Native developers in upgrading their apps.
https://react-native-community.github.io/upgrade-helper
MIT License
3.67k stars 112 forks source link

File paths missing slash when app name omitted #381

Open frankcalise opened 7 months ago

frankcalise commented 7 months ago

Bug

File paths show the app name as the root directory when there is no app name provided, however the first slash is missing in the path resulting in RnDiffApppackage.json for example, rather than RnDiffApp/package.json.

It is properly slashed for directories below this.

In addition to that, there is an inconsistency where if you fill out the app name input, it's just removed altogether from the file paths.

If we're expecting the app name to not show in those title bars, then we'd just need to drop the placeholder name from the title bars (since we don't see it with a custom app name).

https://github.com/react-native-community/upgrade-helper/assets/374022/82374e3f-228d-49c8-9fca-653a72dd82c2

Steps to reproduce

Describe what you expected to happen:

  1. Press Show me how to upgrade!, observe that RnDiffApp/package.json is displayed in the first title bar

  2. Fill out the app name input, press Show me how to upgrade!, observe that the custom app name is displayed in the first title bar such as MyApp/package.json