Browse Source

fix(platform): Rename platform to add more context (#68639)

We decided to rename and include the device in platform name because in
the future there might be other Nintendo devices which would have other
sdks.
Note that this platform is not launched yet so no one is using it and
it's safe to rename.
Athena Moghaddam 11 months ago
parent
commit
6fabe10fc3

+ 3 - 1
static/app/components/events/interfaces/crashContent/exception/rawContent.tsx

@@ -51,7 +51,9 @@ class RawContent extends Component<Props, State> {
 
   isNative() {
     const {platform} = this.props;
-    return platform === 'cocoa' || platform === 'native' || platform === 'nintendo';
+    return (
+      platform === 'cocoa' || platform === 'native' || platform === 'nintendo-switch'
+    );
   }
 
   getAppleCrashReportEndpoint(organization: Organization) {

+ 1 - 1
static/app/components/events/interfaces/frame/line/index.tsx

@@ -98,7 +98,7 @@ function Line({
       case 'objc':
       case 'cocoa':
       case 'native':
-      case 'nintendo':
+      case 'nintendo-switch':
         return (
           <Native
             event={event}

+ 1 - 1
static/app/components/events/traceEventDataSection.tsx

@@ -251,7 +251,7 @@ export function TraceEventDataSection({
       platform === 'objc' ||
       platform === 'native' ||
       platform === 'cocoa' ||
-      platform === 'nintendo'
+      platform === 'nintendo-switch'
     ) {
       return [
         {

+ 2 - 2
static/app/components/platformPicker.tsx

@@ -87,10 +87,10 @@ class PlatformPicker extends Component<PlatformPickerProps, State> {
       return currentCategory?.platforms?.has(platform.id);
     };
 
-    // temporary replacement of selectablePlatforms while `nintendo` is behind feature flag
+    // temporary replacement of selectablePlatforms while `nintendo-switch` is behind feature flag
     const tempSelectablePlatforms = selectablePlatforms;
     if (this.props.organization?.features.includes('selectable-nintendo-platform')) {
-      const nintendo = platforms.find(p => p.id === 'nintendo');
+      const nintendo = platforms.find(p => p.id === 'nintendo-switch');
       if (nintendo) {
         if (!tempSelectablePlatforms.includes(nintendo)) {
           tempSelectablePlatforms.push(nintendo);

+ 1 - 1
static/app/data/platformCategories.tsx

@@ -194,7 +194,7 @@ export const withPerformanceOnboarding: Set<PlatformKey> = new Set([
 export const withoutPerformanceSupport: Set<PlatformKey> = new Set([
   'elixir',
   'minidump',
-  'nintendo',
+  'nintendo-switch',
 ]);
 
 export const profiling: PlatformKey[] = [

+ 3 - 3
static/app/data/platforms.tsx

@@ -355,11 +355,11 @@ export const platforms: PlatformIntegration[] = [
     link: 'https://docs.sentry.io/platforms/native/guides/qt/',
   },
   {
-    id: 'nintendo',
-    name: 'Nintendo',
+    id: 'nintendo-switch',
+    name: 'Nintendo Switch',
     type: 'framework',
     language: 'native',
-    link: 'https://docs.sentry.io/platforms/nintendo',
+    link: 'https://docs.sentry.io/platforms/nintendo-switch/',
   },
   {
     id: 'node',

+ 0 - 0
static/app/gettingStartedDocs/nintendo/index.spec.tsx → static/app/gettingStartedDocs/nintendo-switch/index.spec.tsx


+ 0 - 0
static/app/gettingStartedDocs/nintendo/index.tsx → static/app/gettingStartedDocs/nintendo-switch/index.tsx


+ 1 - 1
static/app/types/project.tsx

@@ -212,7 +212,7 @@ export type PlatformKey =
   | 'native-breakpad'
   | 'native-minidump'
   | 'native-qt'
-  | 'nintendo'
+  | 'nintendo-switch'
   | 'node'
   | 'node-awslambda'
   | 'node-azurefunctions'

+ 1 - 1
static/app/utils/platform.tsx

@@ -42,7 +42,7 @@ export function isNativePlatform(platform: string | undefined) {
     case 'native':
     case 'swift':
     case 'c':
-    case 'nintendo':
+    case 'nintendo-switch':
       return true;
     default:
       return false;

Some files were not shown because too many files changed in this diff