Skip to content

Routing customization, mount home page to "/" #232

@ecbrodie

Description

@ecbrodie

It would be great if there were more options available for customizing the routes that flipper-ui can mount to.

As of present, the route for the home page is defined as "/features" (see https://github.com/jnunemaker/flipper/blob/81e92592c499005aabf42a7ffbe32ba7582859aa/lib/flipper/ui/actions/features.rb#L9). This means that whatever path I mount the flipper-ui routes to in my Rails application's routes.rb file, the home page is at least forced to have a URL path of "/features" appended to it. Mounting the Flipper::UI app to "/" will not work because this will affect my app's other routes, so I am forced to choose another URL path to mount the UI app to. Thus, at the very least the URL of the Flipper UI home page must be "/my-custom-path/features".

I think that there should be more routing customization available for users of flipper-ui. At the very least, routing the home page to "/" would be nice; it allows my app to mount the Flipper::UI app to "/features" and open the home page at "/features" instead of "/features/features". Otherwise, if there must be a non-root route name to route the Rack actions to, perhaps adding an options Hash parameter to the contract of Flipper::UI.app() could enable customization of the route names.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions