Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: Module: RenameVehicles #26

Open
9 of 35 tasks
jxn-30 opened this issue Jun 26, 2020 · 7 comments · May be fixed by #2872
Open
9 of 35 tasks

[Feature Request]: Module: RenameVehicles #26

jxn-30 opened this issue Jun 26, 2020 · 7 comments · May be fixed by #2872
Assignees
Labels
enhancement New feature or request Module Main-Issue for an Module – all ideas are collected here

Comments

@jxn-30
Copy link
Member

jxn-30 commented Jun 26, 2020

Is your feature request related to a problem?
Renaming all vehicles after same system normally takes a long time. This module should ease the process

Solution / Feature
Features:

  • Rename within Station
    • exclude vehicles / vehicle types
  • Rename within dispatch center
    • exclude stations / station types
    • exclude vehicles / vehicle types
    • Rename within LSSM building complex
  • manual rename for a single vehicle when manually opening renaming field
  • variables
    • vehicle
      • original type
      • custom type
      • alias for each vehicle-type
      • alias for each vehicle
      • alias for each custom vehicle type
    • building
      • alias for each building type
      • alias for each building
      • building type
      • building name
    • number vehicles consecutively by type
      • for each station
      • for complete dispatch center
      • different numbering possibilities
        • same options as css?
        • roman numbers
        • arabic numbers
        • alphabetical
        • Leading zeros (eg. 01 instead of 1) => how many leading zeros? how to specify?
        • set static length and fill up on the left (padLeft)
        • set start value (e.g. start with H and count upwards)
        • count in Emojilang (0️⃣ to 9️⃣)
    • conditional variables and strings
    • multiple aliases each
  • multiple alias-sets can be saved
  • multiple presets / "raw formats" can be stored

Alternatives
––– no alternatives –––

Additional
––– currently no additional notes –––

@jxn-30 jxn-30 added the enhancement New feature or request label Jun 26, 2020
@jxn-30 jxn-30 added this to the Beta milestone Jun 26, 2020
@jxn-30 jxn-30 self-assigned this Jun 26, 2020
@jxn-30 jxn-30 added the Module Main-Issue for an Module – all ideas are collected here label Jun 26, 2020
jxn-30 pushed a commit that referenced this issue Oct 31, 2020
@jxn-30 jxn-30 removed this from the Beta milestone Nov 16, 2020
@buffcode
Copy link
Contributor

buffcode commented Feb 3, 2024

I am currently implementing this feature and have most of the functionality ready for vehicles. Regarding "conditional variables and strings" IMHO the most preferable way would be to use a JS template engine that supports an if-else structure, among other possible features that allow advanced use cases when templating an unit / building name.

Do you have any preferences? Quick research:

  • LiquidJS, only one additional dependency, last release December 2023 (Snyk)
  • Twing, Twig-compatible, last releasee January 2024 (Snyk)

@jxn-30
Copy link
Member Author

jxn-30 commented Feb 3, 2024

I haven't looked at them in detail but on first sight, it looks like I would prever LiquidJS.
Please keep in mind, that in the end, usage of the Templates should be very easy to use for everyone, plus we should probably add some docs explaining how to use templates (similar to https://docs.lss-manager.de/de_DE/settings.html#moment-js).

I'm not sure if that is already written down somewhere in the chats etc. but to be sure here 2 thoughts for RenameVehicles that are curently in my mind that I would love to be considered:

  1. I think users would love some kind of "live preview" when creating their template. Maybe one could think of a field where the user can select a vehicle of current "context" and when changing the template, a preview will be auto-updated to show how the new name would look like for this vehicle
  2. Many Users would probably prefer a GUI to design their templates over a simple text-input (especially non-tech-users). This could be done in a future update after initial release but considering the planned logical possibilities (such as conditionals), I think that could be a larger issue than one may think in the beginning.

@buffcode buffcode linked a pull request Feb 4, 2024 that will close this issue
8 tasks
@jxn-30
Copy link
Member Author

jxn-30 commented Feb 8, 2024

additional note: A way to import v3 aliases into v4 would be very useful.

@buffcode
Copy link
Contributor

buffcode commented Feb 8, 2024

additional note: A way to import v3 aliases into v4 would be very useful.

By detecting and importing lssm_LSS_RENAMEFZ_STORAGE from the local storage or modifying the generic import function?

The generic import function would either need to be modified to delegate the import process to the respective modules or have the migration inline. Former one could be quite complex (and OOS for this feature/PR IMHO), later one would introduce module-specific logic into the core.

Use the local storage could be done as simple Vue setting component inside the module which would allow to recurringly import the v3 renameFz settings.

@Cr4zyc4k3
Copy link
Collaborator

Since between there is a major change between v3 and v4 I won't force this feature.

@Cr4zyc4k3
Copy link
Collaborator

Maybe an export function in v3 and a script, which converts the aliases to a readable v4 setting

@jxn-30
Copy link
Member Author

jxn-30 commented Feb 10, 2024

Seems like for importing missionKeywords into v4, I already did some stuff but we never released that: https://github.com/LSS-Manager/lss-manager-v3/tree/missionkeywords-to-v4
I don't even know if it would be ready for release or if something's still missing. Also it's likely that it doesn't work anymore due to changes in LSSMs internal API. But maybe one could use that as a base to add an "export to v4" button for renameFz

@Cr4zyc4k3 Cr4zyc4k3 linked a pull request Mar 2, 2024 that will close this issue
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Module Main-Issue for an Module – all ideas are collected here
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants