Improved prefix support for verified routes
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 42/100
Línea de trabajo
Start at Phoenix.VerifiedRoutes and trace how the existing path_prefixes option is parsed and applied to ~p routes. Define the route-dependent behavior for :locale prefixes, including coexistence with unprefixed routes and multiple prefixes, then verify the implementation against the proposed syntax.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
use Phoenix.VerifiedRoutes currently supports path_prefixes: [{Gettext, :get_locale, []}] as an option. This is quite limiting though, because it's a static prefix set per module (per use call). ~p"/somewhere" implicitly gets the prefix applied based on context alone.
Often prefixes also happen to be mixed in with non prefixed routes in templates (e.g. in the app layout) and the need for distinct modules makes this confusing.
I'm proposing changing the option to path_prefixes: %{"locale" => {Gettext, :get_locale, []}}, which makes applying the prefix depend on the route provided like so: ~p"/:locale/somewhere". This clearly indicates the use of a prefix, while allowing for multiple prefixes as well as no prefix to coexist.
- Lenguaje dominante
- Elixir
- Estrellas
- 23.2k
- Forks
- 3.2k
- Merge medio
- 22 h 45 min
- PR fusionados (30 d)
- 21
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de phoenixframework/phoenix
-
Dificultad 3/5 1-2 días Aptitud para principiantes 56/100
phoenixframework/phoenix#6898 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
~p treats routes as static when they only start with a static directory namePosiblemente ocupada @mandar1045 la tomó hace 6 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 30/100
phoenixframework/phoenix#6895 ·
Los mantenedores suelen responder en 1 día
-
Connection: close header not sent before closing HTTP 1.1 connection when a controller raises an exceptionPosiblemente ocupada @javiergarea la tomó hace 34 días. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
phoenixframework/phoenix#6859 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
phoenixframework/phoenix#6853 · 4 comentarios ·
Los mantenedores suelen responder en 1 día
-
LongPoll session tokens are not bound to the mount path or socket handlerPosiblemente ocupada @SteffenDE la tomó hace 79 días. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
phoenixframework/phoenix#6791 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de phoenixframework/phoenix
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
semaphoreio/semaphore#1391 ·
Los mantenedores suelen responder en 1 día
-
agent-ready area:skills
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
jmbarzee/temporal-architect#588 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
intellij-elixir/intellij-elixir#4659 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
getsentry/sentry-elixir#1259 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
[Bug]: PostgreSQL backend: Queue.remove() / Job.remove() never emit the QueueEvents "removed" eventPosiblemente ocupada @1AbdullahButt la tomó hace 1 día. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
taskforcesh/bullmq#5085 ·
Los mantenedores suelen responder en 1 día