feat: platform-agnostic base style

Đang mở
#30,898 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
typescript
Lĩnh vực
frontend, mobile

Hướng nghiên cứu

Bắt đầu bằng cách xem xét các style hiện có dành riêng cho từng nền tảng iOS và Material cho các component content, modal, router và navigation. So sánh hành vi chung và các điểm tùy chỉnh của chúng, sau đó xác định phạm vi của một theme cơ sở không phụ thuộc nền tảng. Công việc được xem là hoàn tất khi có thiết kế đã được thống nhất và kế hoạch triển khai cho các giá trị mặc định hợp lý, khả năng tùy chỉnh, transition và gesture.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

triage
Prerequisites
Describe the Feature Request

tl;dr: Introduce a new minimal "base" style, which is platform-agnostic and more customizable than the current platform-specific styles.

I've been using Ionic for 8 years now in a production app with great success. When liquid glass was announced, my first thought was that this could become a problem for Ionic and other cross-platform frameworks, because they usually have one style per platform, but not per OS version number. If Ionic adjusts to liquid glass, it will be the same style even for devices running anything < iOS 26. Now, Ionic has the problem that it looks like "old iOS" on iOS 26 devices.

However, after using the mess which is called liquid glass, I'm convinced that app developers won't even bother with making their app look Apple-like and rebuilding liquid glass in CSS is a waste of time. Liquid glass is so opinionated that devs might actually go for a more unified style for both Android and iOS just like Flutter apps, which have pixel-perfect matching styles. For React Native, it's similar. While they do have platform-specific styles, big apps try to use their own design system instead of going for that Apple- or Material-specific look. UI libraries like shadcn/ui are on the rise, which give apps a unified look.

Flutter seems to be surprisingly popular, too, even though they don't even give you simple OS-level tools like text selection, copy-paste etc. which you get for free in an Ionic app.

Ionic is still unique, because it gives devs sensible defaults, a great dev experience, good basics like page transitions, modal transitions, gestures, toggles, a router and I love the idea that Ionic components are just Web components. Another framework that tries to mimic liquid glass is KonstaUI, but they lack transitions and gestures. I also thought about creating my own mini-framework that is mostly without styles, but this made me appreciate all of the tiny things that Ionic does right even more (especially transitions, gestures, the whole overscroll/rubberbanding effect etc.)

On modern devices, I don't really see the reason to use Flutter, because why would I need a custom rendering engine if Chrome and Safari can be my rendering engines and I can write HTML/CSS/JS to make true cross-platform apps with a single code base.

The biggest disadvantage of Ionic is that it is hard to customize the theme, partially because the web components use ShadowDOM, partially because "ios" and "md" are deeply entrenched in the framework. What I'd like to see and maybe this is a vision that'd work for the Ionic team, too:

Make a new "base" theme that can easily be customized. Maybe the base theme could have mostly unstyled components or comes only with the bare minimum components to make a SPA feel applike: content, header, modal, router, transitions including all gestures etc.

Anyways, I just wanted to put this out here and hear from people what they think about this.

Describe the Use Case

Apps that want to have more of their own design system without using Material or Liquid Glass.

Describe Preferred Solution

Make content, modal, router, nav have a sensible base style that works on both platforms, make them open so that I could customize transition speeds etc. but still get a great UI out of the box.

Describe Alternatives

Build my own, but then lose access to all the work that went into optimizing the "headless" part of Ionic core components.

Related Code

No response

Additional Information

No response

Ngôn ngữ chính
TypeScript
Star
52.8k
Fork
13.3k
Merge trung bình
3 ngày 1 giờ
Pull request đã merge (30 ngày)
86

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của ionic-team/ionic-framework

Tất cả issue của ionic-team/ionic-framework

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.