Git Product home page Git Product logo

hk-independent-bus-eta's Introduction

香港 - 獨立巴士預報 HK Bus ETA

React Test

無廣告的巴士預報站整合了香港巴士(九巴、龍運、城巴、嶼巴、港鐵巴士)、綠色小巴、輕鐵及港鐵的到站預報,介面清晣直接,力求讓用戶快速獲得所需資訊。

An ad-free bus ETA site for Hong Kong, with arrival times from KMB, LWB, CTB, NLB, green minibus, light rail, and MTR, with a clutter-free UI that lets you get what you need, fast.

常見問題 FAQ

常見問題 FAQ

資料來源 Data Sources

本網站一切到站預報資料均來自資料一站通空間數據共享平台及相關機構,路線及收費資料來自HK Bus Crawling

ETA data is from DATA.GOV.HK, Common Data Spatial Infrastructure and respective providers. Route and fare data from HK Bus Crawling.

Note

The project is a React web app with Material-UI. You can clone the project and host it by your own, for personal use. Please note that there are specific setups for package.json (i.e., homepage) and Google Analytics Measure ID in public/index.html.

Docker

See docker.md for more information about using docker for deployment / development.

Available Scripts

Note: It is assumed that you are running the scripts in a unix-like environment. Windows is not supported.

In the project directory, you can run:

yarn start

Runs the app in development mode.
Open http://localhost:5173 to view it in your browser.

The page will reload if you make edits.
You will also see lint errors in the console.

yarn build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.

yarn production-build

Build the app with SEO optimized pages.

Contributors

Project owner chunlaw is the initiator of the whole project. Everyone is welcome to contribute. Other contributors are listed below (ordered by alphabetical order):

LOOHP

chakflying

chengkeith

cswbrian

evnchn

hk-ng

kkoyung

lifehome

louiscklaw

lzwn128

sdip15fa

skpracta

thomassth

maruk0chan

hk-independent-bus-eta's People

Contributors

akino-kaede avatar chakflying avatar chengkeith avatar chunlaw avatar cswbrian avatar evnchn avatar hk-ng avatar lifehome avatar loohp avatar louiscklaw avatar maruk0chan avatar masonwongcs avatar sakiwei avatar sdip15fa avatar skpracta avatar thomas930 avatar thomassth avatar xavier114fch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

hk-independent-bus-eta's Issues

Not respecting device width and height

Tested on Firefox Focus on Android v8. 17.1(gecko 90) and Samsung internet 14.2.1.69 (chromium 87) .

In Firefox, only width is overflowing. In samsung internet, both width and height are overflowing

Screenshot_20210717-124210_Samsung Internet.png

Bug: Overflow issue of long continuous text in Notification page

FireShot Capture 010 - 儀表板 - 巴士到站預報 App (免費無廣告) - hkbus app

Suggest solution:
Add following in line 69 of \pages\Notice.tsx

wordWrap: "break-word",

So it would be:

const paperSx: SxProps<Theme> = {
  display: "flex",
  flexDirection: "column",
  overflow: "auto",
  width: "100%",
  flex: 1,
  textAlign: "left",
  p: 1,
  gap: 2,
  bgcolor: "unset",
  wordWrap: "break-word",
};

And the page will be fixed as:
FireShot Capture 012 - 儀表板 - 巴士到站預報 App (免費無廣告) - hkbus app

feature request: 最近車站 indicator

original msg by 粒子風暴
建議加番indicator cater番「最近車站」

例如
ISL 📍北角 - 57米 (📍即表示最近車站)
ISL 北角 - 57米 (固定車站)
ISL 鰂魚涌 - 868米
ISL 中環 - 4.6公里

date: 2023-12-05

Bug: [Mobile] Back button cannot close Modals

Description

Back button on mobile cannot close Modals, and instead change the location of the page in background. This leads to very strange behaviour in Settings -> "管理收藏" -> "顯示時間". This is because opening Modals only update the DOM, but the back button relies on navigation through the browser history stack.

Possible Solution

Maybe we can wrap the Modal component to modify the history stack on open/close, as suggested in mui/material-ui#12759. But it seems quite complicated as we would need to prevent duplicate entries from polluting the history.

[Suggestion] Use Stop ID instead of Stop Index in direct (share) URL

I suggest switching from using stop index (hkbus.app/zh/route/208-1-tsim-sha-tsui-east-broadcast-drive/0)
to using the stop id (hkbus.app/zh/route/208-1-tsim-sha-tsui-east-broadcast-drive/65194DB76048113F).

This enables share links to survive stop additions and removals on the route over time, it also makes telling which stop the link is referring to more straightforward programmatically.

Issue: 對頭線功能

Issue: 對頭線功能

Route: 17M van

Search 17M, will return
*1 17M 往 寶琳站
*2 17M 往 九龍醫院
*3 17M 往 翠林
*4 17M(特別班) 往 寶琳站(經康寶路)
*5 17M(特別班) 往 通菜街

if click on *2 "往 九龍醫院", then click on 對頭線, will continue between *1 "往 翠林" and *3 "往 寶琳站", cannot get back to *2 "往 九龍醫院".
actually "往 九龍醫院" is 循環線, no 對頭線.

Maybe caused by data issue.

feature request: 收埋無ETA 的路線

Msg by 一個人:

係咪可以整多(幾)個 選擇,去收埋:

完全無運輸署班次資料嘅路線
(例如西九龍站散場車,
開得一千零一次但係仲見到九巴有 data);

對唔上運輸署班資料嘅路線「特別班」?
(呢個難搞,城巴本身都一堆線有資料但配對唔到)

Date: 2023-12-05

Feature request: improve bus route number searching with filters

Date: 2023-12-14

一個人:
有時手痕想睇有乜西隧過海線就打 9,
然後見到我唔諗住睇嘅 9/90/91 等喺頂⋯⋯

如果真係想方便睇多幾條唔同數字嘅路線,
不如整多個「分組搜尋」,
按十位、百位數字 及/或 英文字母分組去睇?

十位數分組
0-9
10-19
20-29
...
980-989
990-999 (實際無)
A0-A9 (實際無)
A10-A19
...
N990-N999 (實際無)
NA0-NA9 (實際無)
NA10-NA19
...
X990-X999 (實際無)

百位數分組
0-99
100-199
200-299
...
900-999
A0-A99
...
N900-N999
NA0-NA99
...
X0-X99
...
X900-X999

字母開頭分組
#(數字開頭)
A
B
C
...
X
Y (除咗無乜資料嘅 Y31/Y41 無其他)
Z (實際無)

Eternal Flame:
我覺得係nice to have
最簡單係filter by巴士公司,已經可以cut down個list.

Example:
https://github.com/hkbus/hk-independent-bus-eta/assets/152949070/f8f2e245-551d-4cef-b5b2-3c509301a879

Feature request: Filter by public holidays

粒子風暴
Date: 2023-12-27

收藏可以filter時間幾好用
喺特定時間場景,睇淨係我關注嘅路線
除現有星期一至日,希望可以加埋filter「假期」(load政府假期open data?)
同運輸署時間表分類同步
(即 i. 星期一至五,ii. 星期六,及iii.星期日及公眾假期)

IMG_20231228_131118_121.jpg

feature request: Add loading screen

Date 2023-12-04
original msg by 粒子風暴:
Hi Chun refer video 發現頭4秒應該係load緊d default screens,見有其他用户有相同情況(例如第一秒show 208號,實際地點與此結果無關連),可以加番Loading screen(如有progress bar更理想),到第四秒果個screen就切換真正版面,成件事會流暢D,謝謝考慮


多謝你嘅意見❤️
解釋下先,見到 208 個頁係 for SEO 見到嘅,始終個 app 無真 server rendering,208嗰到係 prerender 定等個 app load
確實暫時未有更好嘅解決方法,希望有高手指教


Prerender果下set 支 bLoaded flag FALSE,第一下有「真data」果下raise 支flag TRUE。
bLoaded FALSE 等待期間,用版Loading screen 覆蓋住佢,可行?


可行,但 seo 好多細節😅

Feature request: 收藏路線新增分類功能

需要此功能的 use case: 將前往相若目的地但位於不同上車站的ETA集合在一個分類,打開該分類即可查看有關路線ETA,不被其他不相關路線干擾

例子:收藏路線創建以下兩個分類,並包含下列路線
收藏路線分類1:長安巴士總站往青衣碼頭
以下路線長安巴士總站有各自不同站頭
41M, 42C, 43B, 44, 49X, 41 (241X), 243M

收藏路線分類2:荃灣返長安
巴士站直頭o係唔同馬路,要睇ETA先知道行去邊個車站等車
41M, 42M, 43B, 49X, 243M

Images for FAQ wiki

This issue thread serves as a placeholder for images in FAQ wiki.

No follow-up action is required.

IMG_20231226_230302_030

IMG_20231226_230306_221

Route confusion for minibus routes with the same name when using the "REV" button

Found this issue while using the app casually.
Not urgent as the user can go back to the starting page and search again.

Steps to recreate the issue:

  • Select the route "20M"
  • Select either the first or the second option (San Po Kong <> Wong Tai Sin station
  • Press the "REV" button
  • UI now displays another route which is in another region of Hong Kong (KLN vs NT)

Additionally, pressing REV button again will cause the display to switch to another route, despite it being a circular route.

Feature request: 精簡港鐵ETA顯示

Date: 2023-12-07

IMG_20231207_113849_014.jpg
有冇可能顯示返目的地🙏例如「落馬洲」

Loophp James 建議:
07:52 3分鐘 - ❶ 落馬洲
(或者不要hyphen)

參考
IMG_20231207_113855_628.jpg

Bus predicted arrival time can not load

Starting from recent, I have found out the arrival data can not be loaded. Here is the screenshot.
_20220704_064357

However, data on home can be loaded.
_20220704_064518

I am using Firefox Nightly 102.0a1, on Android 9, with UBlock Origin addson.

Ask for opinion / discussion: UK London version

Thank you very much to @chunlaw for founding the project and the contributions from all contributors. It is a great eta app.

I would like to folk it and make a UK London version. I would like you and other contributors advise.

Home Screen icon on iOS has black background

Issue

After installing PWA on iOS, the home screen icon of hkbus.app has a black square background with rounded corners, behind the circular yellow icon. The yellow background of the icon is expected to extend to the rounded corners.

Screenshots

Screenshot 2023-12-02 at 16 35 00

Steps to Reproduce

  1. Enter https://hkbus.app on iOS Safari.
  2. Click the share button, and click "Add to Home Screen".

Versions

hkbus.app 11.1.0-0d281ab
iOS 17.1.2

feature request: 用戶自行指定「附近」距離 上限

粒子風暴:
建議 增加 指定「附近」距離 上限 選項
(例如 100 米、200 米、500 米)

建議enhance個人化
可Default「附近」做 200m,但可以選1km甚至2km(例如西貢區用户有可能)

Date: 2023-12-05

Migrating to Vite

Try a bit, but failed to migrate the service-worker.js, no time to drag on :'(

feature request: UI improvement

Date: 2023-10-12
original msg by 一個人:

首頁依家預設有幾個 tab:
附近、常用、收藏(、可以修改或移除嘅路線收藏:HOME、WORK)

Bookmark 路線 依家 分開 咗兩種:
常用路線(無得改名、無得刪)、
路線收藏(可以改名、可以加、可以刪)。
當初加「路線收藏」就會喺用家指定嘅時段喺 收藏 呢個 tab 顯示唔同嘅 路線收藏,
自從「橫向展開收藏路線」之後,全部收藏都可以全日顯示,首頁嗰個「收藏」tab 似乎變得可有可無,顯示時間又好似有啲多餘。
呢兩種 bookmark 路線 有無得整合?
首頁嘅預設 tab 又有無得修改?

而同時間加嘅「車站收藏」(bookmark 車站)就因為唔係首頁,所以要喺下面條 bar 撳多次先睇到。
偏好睇車站收藏多過路收藏線嘅人一定要撳多次先睇到佢哋要睇嘅嘢。
開 app 第一頁係咪應該容許自訂為非「首頁」?
當開 app 第一頁可能唔係「首頁」嗰陣,個「首頁」睇怕要改名。


「首頁」:
預設 維持單層 tab bar 但刪走「收藏」、加入用家嘅「車站收藏」,
用家可以自訂排版
按唔同時間 或者 全日 顯示 唔同內容
如 附近路線、路線收藏、車站收藏、
單層 或 雙層 tab bar、
空白頁、一段文字(如「夜啦早啲瞓啦」)。


常用路線 / 常用:
刪除,現有 bookmark 移去「路線收藏」內預設嘅「常用」。

附近路線 / 附近:
容許用家自訂 關閉定位功能 / 無定位訊號 時 位置。

路線收藏:
加入自訂圖示功能
(現有用家自訂收藏預設「無圖示」),
預設三組,中英對照,
預設組合未修改名稱、圖示時
會隨 app 顯示語言改名,
中文分別為「⭐️ 常用」、「💼 上班」、「🏠 回家」,
英文分別為「⭐️ STARRED」、「💼 WORK」、「🏠 HOME」。
路線收藏唔再提供顯示時間設定,
由 個性化設定 新增 首頁排版 取代。

車站收藏:
加入自訂圖示功能
(現有用家自訂收藏預設「無圖示」)。

Bottom bar「🛜 附近」:
新加,呢粒制可以選擇 顯示 / 隱藏,
只顯示附近路線。

Bottom bar「🔢 路線收藏」:
新加,呢粒制可以選擇 顯示 / 隱藏,
只顯示路線收藏。

Bottom bar「🚩 車站」:
改為「🚩 車站收藏」,
呢粒制可以選擇 顯示 / 隱藏,
只顯示車站收藏。

Bottom bar「⭐️ 收藏」:
新加,呢粒制可以選擇 顯示 / 隱藏,
若 顯示 則可以選擇兩種排版。
第一種排版為單層 tab bar,
展示 所有 路線收藏、車站收藏;
第二種排版為雙層 tab bar,
第一層 展示 路線、車站,
第二層 視乎第一層選擇 展示 路線收藏 或 車站收藏。

Bottom bar:
有 6 粒制或以上時可横向捲動;
可以自訂除「首頁」外嗰幾粒制排序。

Bug: 車站好似唔識自動更新,要強制update 頁面才會更新

Original msg by Akira:

IMG_20231205_153942_345.jpg

最近車站好似唔識自動更新,要碌去其他頁再返嚟就識得轉。

Chun: 㩒最頂定位個 icon 應該得

幫你試左,唔 work,畫面成個向下拉強制 update 就可以。

最頂個 icon 只能 trigger 定位一次,本身已經開左自動 update 位置 per 5 seconds


粒子風暴也有相同的發現,非只出現地鐵,巴士都係咁

VID_20231205_154503_804.mp4

他用 Android app 遇到呢個情況

`detectRetina` causes excessively small map text on Android

With detectRetina enabled, the map text is basically unreadable.

with detectRetina no detectRetina
Screenshot_20231122-185005 Screenshot_20231122-185108

Device: Pixel 4a
OS: Android 13
Developer options -> Smallest width: 462dp
Tested on Firefox mobile, the React Native app installed on play store shows the same result as with detectRetina.

Problem: 城巴 702 循環線

Date: 2023-12-06

曦齊:
702又一城至海麗邨,唔見咗又一城至北河街的七個站😂

Chun:
https://hkbus.app/zh/route/702-1-fuk-wing-street,-yen-chow-street-hoi-lai-estate

運輸署定義為來回綫,城巴就當循環綫

所以分開咗

D Wong:
應該係將特別班次撈亂咗,因為對面方向都係變咗短途車,㩒時間表就睇到

城巴 official: 星期一至五的上課日 (公眾假期及學校假期除外) 增設 07:14 特別班次由泓景臺, 深盛路開往大坑西新邨民樂樓, 窩仔街,以及增設 07:25 特別班次由福榮街, 欽州街開往海麗邨

Chun:
先多謝支持
呢條路綫真係要個別研究😭

Bug: NLB using same waypoint json for both direction

original msg by 一個人:
新大嶼山巴士
好似條條線嘅 waypoints 來回程都只顯示其中一個方向

例如
開 B2﹑B2P﹑B2X 呢幾條睇
唔理係去深圳灣定係返元朗﹑天水圍方向,
都係顯示咗去深圳灣方向嘅行車路線

我未睇
係 CSDI 錯
定係 waypoints 爬錯


其實係 fronend 錯, 新大嶼山巴士兩個方向都係 load 緊同一個 json
e.g. B2 兩個方向都係 load 緊 1735-O.json

feature request: Turn off animation option

original msg by 粒子風暴:

點選按鈕時,現時有一些過場動畫(e.g. 橫Bar移動/點站名時的擴展 等等)

這些動畫也許對某些使用者是不必要,或是什至對於某些效能一般的電話造成負擔(lag機)

所以建議在個性化設定新增選項以去除動畫,Thanks!

Feature request: refresh button or pull to refresh

Date: 2023-12-22

Akira Akiyama: 有時搭 lift 手快開定個 app 會彈 load 唔到內容,因為無上網。但無粒制可以 refresh 個頁,要 kill 左 app 再開先得。

唉唷 大叔:
我有類似情況。。係已經開咗個app出嚟用緊。。然後轉用其他app做其他嘢。。再番轉頭用個app就只有黑屏
。一定要kill app再開過先用到。

Raymond Tau:
我用webpage install app都有呢個問題。

Possible solution:
a. refresh button
b. Pull to refresh

Pull-to-refresh - Wikipedia
https://en.wikipedia.org/wiki/Pull-to-refresh

Custom range slider cannot set new value

Found that if the range is some numbers other than 0, it needs to be changed to new number which is much greater (like a few steps but still not sure) than the old one to be effective.

For example, it doesn't work changing it from 2km to 1.25km but 1km.

It seems that the new value is being forced to change to a new value that needs to be a few steps away the old one.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.