Can you replace user's input when using CompletionProposal?
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
Línea de trabajo
Start by inspecting CompletionProposal and its displayText, category, and description methods. Determine how completion matching and replacement currently use the proposal text. Done means search terms such as enum properties or descriptive names can select a proposal while replacing the input with its final value and showing a clear label to the user.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Let's say the options are an enum of DayOfWeek; and each day has an associated number and color (just for the sake of an example).
public enum DayOfWeek {
MONDAY(0, "yellow"),
TUESDAY(1, "blue"),
WEDNESDAY(2, "pink"),
THURSDAY(3, "purple"),
FRIDAY(4, "orange"),
SATURDAY(5, "green"),
SUNDAY(6, "red");
public int num;
public String color;
public DayOfWeek(int num, String color) {
this.num = num;
this.color = color;
}
public static List<CompletionProposal> completion() {
return Arrays.stream(values()).map(Enum::name).map(CompletionProposal::new).toList();
}
}
I want the user to get autocomplete with all the properties, in addition to the enum name.
If I give the List<CompletionProposal> of the names of the enum constants, this will work:
MON -> MONDAY
What if I want the user to type gre or green and then have it change to SATURDAY?
Even if that is not possible, what if I type satur? It won't autocomplete to SATURDAY or saturday, unless I include the day twice as upper and lower cases, which is confusing to the user.
The only way I can think of showing it to the user is to use the displayText, category, or description method to the user, but it's still a chore to type exactly the words.
In my case I have IDs of a huge list, and the user won't remember the entire IDs of the list, so I would like them to autocomplete with a sort of a "search" feature. Let's say I type "Mark Twain" or "Tom Sawyer", I want to get "94782293" to replace the words I typed, since the final value will be an ID, but the other words help search. So far I'm using displayText as Tom Sawyer by Mark Twain: 94782293, but the value is 94782293, which is obscuring what's happening to the user.
- Lenguaje dominante
- Java
- Estrellas
- 826
- Forks
- 404
- Merge medio
- 6 d 9 h
- PR fusionados (30 d)
- 1
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 spring-projects/spring-shell
-
Dificultad 3/5 1-2 días Aptitud para principiantes 72/100
spring-projects/spring-shell#1391 · 1 comentario ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 65/100
spring-projects/spring-shell#1390 · 1 comentario ·
-
type/enhancement
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
spring-projects/spring-shell#1383 · 6 comentarios ·
-
Revisit dependency to reactorAbiertoarea/dependencies type/enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
spring-projects/spring-shell#1213 · 1 reacción ·
-
area/dependencies type/enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
spring-projects/spring-shell#1205 · 1 comentario ·
Todos los issues de spring-projects/spring-shell
Issues similares
-
[destination-snowflake] Custom domains rejected unlike source connectionsPosiblemente ocupada @kuza55 la tomó hoy. Abiertoautoteam community connectors/destination/snowflake team/use
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
area-dashboard
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
component/operate kind/feature-request
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
Forge coverage prompts carry text the agent cannot act onPosiblemente ocupada @graalvmbot la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
oracle/graalvm-reachability-metadata#10572 ·
Los mantenedores suelen responder en 1 día
-
Bundled migration plansAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
IBM/sample-app-mod#55 ·