OneBusAway / onebusaway-ios

OneBusAway for iOS, written in Swift.
Other
82 stars 33 forks source link

Add a custom region by simply tapping on a URL #719

Closed aaronbrethorst closed 4 months ago

aaronbrethorst commented 6 months ago

Find the Android version of this task here: https://github.com/OneBusAway/onebusaway-android/issues/1179

User story

As an OBA developer and region tester I want to be able to easily add custom regions to my OBA app So I can easily work with a region I'm testing.

Overview

Currently, the process of adding a custom region requires painstakingly typing URLs into text boxes on iPhones and Android devices. The purpose of this feature is to make the process much easier by allowing the addition of a custom region by simply tapping on a custom-crafted URL.

The URLs must be compatible between iOS and Android—i.e. I can tap on a custom region URL on either type of device and have the same result in my app.

Here's a basic example of an URL:

onebusaway://add-region?name=Unitrans&oba-url=https%3A%2F%2Fonebusaway-api-server-7mb1.onrender.com%2Fonebusaway-api-webapp

Full list of supported parameters:

Requirements

hilmyveradin commented 6 months ago

Hi @aaronbrethorst, Currently working on this now. You can assign this to me ^^

aaronbrethorst commented 6 months ago

thanks @hilmyveradin!

hilmyveradin commented 6 months ago

Hi @aaronbrethorst , I already tried this out

So I have 2 issues

  1. The zoom in of bounds seems like isn't correct. I already choose the result of agencies-with-coverage
  2. When I change the maps, seems like there's an error of alert not found. Is this expected?

Also, My question about this feature is, If developers opened the settings, will this region is saved? Or it's just temporary? For what I tried, I immediately select the region before adding it up to the lists

Here's the video that I mentioned:

https://github.com/OneBusAway/onebusaway-ios/assets/74521244/f99029c9-8573-4974-85fc-dd3cd0389ce4

aaronbrethorst commented 6 months ago

the custom region should be saved. the outcome of tapping one of these links should be identical to creating a new custom region from the settings > region UI

aaronbrethorst commented 4 months ago

fixed in #723