Add iOS roadmap

This commit is contained in:
Kamran Ahmed
2024-05-29 00:29:50 +01:00
parent a3999d04dd
commit bb848de581
175 changed files with 262 additions and 19 deletions
+45 -18
View File
@@ -23,7 +23,7 @@ import type {
} from '../CustomRoadmap/CustomRoadmap';
import { markdownToHtml, sanitizeMarkdown } from '../../lib/markdown';
import { cn } from '../../lib/classname';
import { Ban, FileText, X } from 'lucide-react';
import { Ban, FileText, HeartHandshake, X } from 'lucide-react';
import { getUrlParams } from '../../lib/browser';
import { Spinner } from '../ReactIcons/Spinner';
import { GitHubIcon } from '../ReactIcons/GitHubIcon.tsx';
@@ -58,6 +58,7 @@ export function TopicDetail(props: TopicDetailProps) {
const [isContributing, setIsContributing] = useState(false);
const [error, setError] = useState('');
const [topicHtml, setTopicHtml] = useState('');
const [hasContent, setHasContent] = useState(false);
const [topicTitle, setTopicTitle] = useState('');
const [topicHtmlTitle, setTopicHtmlTitle] = useState('');
const [links, setLinks] = useState<RoadmapContentDocument['links']>([]);
@@ -177,6 +178,9 @@ export function TopicDetail(props: TopicDetailProps) {
const titleElem: HTMLElement = topicDom.querySelector('h1')!;
const otherElems = topicDom.querySelectorAll('body > *:not(h1, div)');
setHasContent(otherElems.length > 0);
setContributionUrl(contributionUrl);
setHasEnoughLinks(links.length >= 3);
setTopicHtmlTitle(titleElem?.textContent || '');
@@ -207,7 +211,6 @@ export function TopicDetail(props: TopicDetailProps) {
return null;
}
const hasContent = topicHtml?.length > 0 || links?.length > 0 || topicTitle;
const resourceTitleForSearch = resourceTitle
?.toLowerCase()
?.replace(/\s+?roadmap/gi, '');
@@ -225,7 +228,7 @@ export function TopicDetail(props: TopicDetailProps) {
className="fixed right-0 top-0 z-40 flex h-screen w-full flex-col overflow-y-auto bg-white p-4 focus:outline-0 sm:max-w-[600px] sm:p-6"
>
{isLoading && (
<div className="flex w-full h-full items-center justify-center">
<div className="flex h-full w-full items-center justify-center">
<Spinner
outerFill="#d1d5db"
className="h-6 w-6 sm:h-8 sm:w-8"
@@ -265,20 +268,45 @@ export function TopicDetail(props: TopicDetailProps) {
{/* Topic Content */}
{hasContent ? (
<div className="prose prose-quoteless prose-h1:mb-2.5 prose-h1:mt-7 prose-h1:text-balance prose-h2:mb-3 prose-h2:mt-0 prose-h3:mb-[5px] prose-h3:mt-[10px] prose-p:mb-2 prose-p:mt-0 prose-blockquote:font-normal prose-blockquote:not-italic prose-blockquote:text-gray-700 prose-li:m-0 prose-li:mb-0.5">
{topicTitle && <h1>{topicTitle}</h1>}
<div
id="topic-content"
dangerouslySetInnerHTML={{ __html: topicHtml }}
/>
</div>
<>
<div className="prose prose-quoteless prose-h1:mb-2.5 prose-h1:mt-7 prose-h1:text-balance prose-h2:mb-3 prose-h2:mt-0 prose-h3:mb-[5px] prose-h3:mt-[10px] prose-p:mb-2 prose-p:mt-0 prose-blockquote:font-normal prose-blockquote:not-italic prose-blockquote:text-gray-700 prose-li:m-0 prose-li:mb-0.5">
{topicTitle && <h1>{topicTitle}</h1>}
<div
id="topic-content"
dangerouslySetInnerHTML={{ __html: topicHtml }}
/>
</div>
</>
) : (
<div className="flex h-[calc(100%-38px)] flex-col items-center justify-center">
<FileText className="h-16 w-16 text-gray-300" />
<p className="mt-2 text-lg font-medium text-gray-500">
Empty Content
</p>
</div>
<>
{!canSubmitContribution && (
<div className="flex h-[calc(100%-38px)] flex-col items-center justify-center">
<FileText className="h-16 w-16 text-gray-300" />
<p className="mt-2 text-lg font-medium text-gray-500">
Empty Content
</p>
</div>
)}
{canSubmitContribution && (
<div className="flex h-[calc(100%-38px)] flex-col items-center justify-center max-w-[400px] mx-auto text-center">
<HeartHandshake className="h-16 w-16 text-gray-300 mb-2" />
<p className="text-lg font-semibold text-gray-900">
Help us write this content
</p>
<p className="text-sm text-gray-500 mt-2 mb-3">
Write a brief introduction to this topic and submit a link to a good article, podcast, video, or any other self-vetted resource that helped you understand this topic better.
</p>
<a
href={contributionUrl}
target={'_blank'}
className="flex w-full items-center justify-center rounded-md bg-gray-800 p-2 text-sm text-white transition-colors hover:bg-black hover:text-white disabled:bg-green-200 disabled:text-black"
>
<GitHubIcon className="mr-2 inline-block h-4 w-4 text-white" />
Submit a Pull Request
</a>
</div>
)}
</>
)}
{links.length > 0 && (
@@ -313,8 +341,7 @@ export function TopicDetail(props: TopicDetailProps) {
<div className="mb-12 mt-3 border-t text-sm text-gray-400">
<div className="mb-4 mt-3">
<p className="">
Can't find what you're looking for? Try these pre-filled
search queries:
Find more resources using these pre-filled search queries:
</p>
<div className="mt-3 flex gap-2 text-gray-700">
<a
@@ -0,0 +1 @@
# Accessibility Inspector
@@ -0,0 +1 @@
# Accessibility
@@ -0,0 +1 @@
# Alamofire
@@ -0,0 +1 @@
# App Store Distribution
@@ -0,0 +1 @@
# App Store Optimization (ASO)
@@ -0,0 +1 @@
# Architectural Patterns
@@ -0,0 +1 @@
# ARKit
@@ -0,0 +1 @@
# async / await in Swift
@@ -0,0 +1 @@
# Async / Await
@@ -0,0 +1 @@
# Auto layout
@@ -0,0 +1 @@
# AV Foundation
@@ -0,0 +1 @@
# Azure
@@ -0,0 +1 @@
# Basic Interfaces
@@ -0,0 +1 @@
# Basics / Creating Animations
@@ -0,0 +1 @@
# Benefits over Objective-C
@@ -0,0 +1 @@
# Breakpoints
@@ -0,0 +1 @@
# Building Interfaces
@@ -0,0 +1 @@
# Callback Hell
@@ -0,0 +1 @@
# Callbacks
@@ -0,0 +1 @@
# Capturing Values & Memory Mgmt.
@@ -0,0 +1 @@
# Carthage
@@ -0,0 +1 @@
# CI / CD
@@ -0,0 +1 @@
# Circle CI
@@ -0,0 +1 @@
# Closures
@@ -0,0 +1 @@
# Cocoa Touch
@@ -0,0 +1 @@
# CocoaPods
@@ -0,0 +1 @@
# Code Quality Tools
@@ -0,0 +1 @@
# Combine and MVVM
@@ -0,0 +1 @@
# Combine
@@ -0,0 +1 @@
# Components
@@ -0,0 +1 @@
# Components
@@ -0,0 +1 @@
# Concurrency and Multithreading
@@ -0,0 +1 @@
# Concurrency (GCD, async/await)
@@ -0,0 +1 @@
# Concurrency
@@ -0,0 +1 @@
# Core Animation
@@ -0,0 +1 @@
# Core Animation
@@ -0,0 +1 @@
# Core Audio
@@ -0,0 +1 @@
# Core Data
@@ -0,0 +1 @@
# Core Graphics
@@ -0,0 +1 @@
# Core Image
@@ -0,0 +1 @@
# Core ML
@@ -0,0 +1 @@
# Core OS
@@ -0,0 +1 @@
# Core Programming Concepts
@@ -0,0 +1 @@
# Core Services
@@ -0,0 +1 @@
# Data binding
@@ -0,0 +1 @@
# Data Persistence
@@ -0,0 +1 @@
# Debug Navigator
@@ -0,0 +1 @@
# Debugging Techniques
@@ -0,0 +1 @@
# Declarative Syntax
@@ -0,0 +1 @@
# Delegate Pattern
@@ -0,0 +1 @@
# Dependency Manager
@@ -0,0 +1 @@
# Dynamic Library
@@ -0,0 +1 @@
# Dynamic Type
@@ -0,0 +1 @@
# Editors
@@ -0,0 +1 @@
# Error Handling
@@ -0,0 +1 @@
# FastLane
@@ -0,0 +1 @@
# File System
@@ -0,0 +1 @@
# Frameworks & Library
@@ -0,0 +1 @@
# Frameworks
@@ -0,0 +1 @@
# Functional Programming
@@ -0,0 +1 @@
# GameKit
@@ -0,0 +1 @@
# GCD
@@ -0,0 +1 @@
# Git
@@ -0,0 +1 @@
# GitHub Actions
@@ -0,0 +1 @@
# GitHub
@@ -0,0 +1 @@
# GitLab
@@ -0,0 +1 @@
# GraphQL
@@ -0,0 +1 @@
# Groups
@@ -0,0 +1 @@
# HealthKit
@@ -0,0 +1 @@
# HIG
@@ -0,0 +1 @@
# History and Why Swift?
@@ -0,0 +1 @@
# HTTP / HTTPs
@@ -0,0 +1 @@
# IBActions
@@ -0,0 +1 @@
# IBOutlets
@@ -0,0 +1 @@
# Implementing Delegates
@@ -0,0 +1 @@
# Installing
@@ -0,0 +1 @@
# Interface Builder
@@ -0,0 +1 @@
# Interface overview
@@ -0,0 +1 @@
# Interoperability with Swift
@@ -0,0 +1 @@
# iOS Architecture
@@ -0,0 +1 @@
# Jenkins
@@ -0,0 +1 @@
# JSON / XML
@@ -0,0 +1 @@
# Keeping Updated with WWDC
@@ -0,0 +1 @@
# Keychain
@@ -0,0 +1 @@
# Latest iOS SDK
@@ -0,0 +1 @@
# Latest Swift Version
@@ -0,0 +1 @@
# Lottie
@@ -0,0 +1 @@
# MapKit
@@ -0,0 +1 @@
# Media
@@ -0,0 +1 @@
# Memory Management
@@ -0,0 +1 @@
# Meta
@@ -0,0 +1 @@
# Modals and Navigation
@@ -0,0 +1 @@
# MVC
@@ -0,0 +1 @@
# MVP
@@ -0,0 +1 @@
# MVVM-C
@@ -0,0 +1 @@
# MVVM
@@ -0,0 +1 @@
# Navigation Controllers, Segues
@@ -0,0 +1 @@
# Navigation Stacks
@@ -0,0 +1 @@
# Navigation Stacks

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