Giter Club home page Giter Club logo

Comments (6)

WilliamsJack avatar WilliamsJack commented on July 21, 2024

A "Save as" button might be a nice way to achieve this. That way the user can edit their existing config and then decide to save their changes over their existing config with the Save button or as a new config with Save as. This means we don't have to populate the editor with new data and we don't need to keep track of whether the user is editing a new file or an existing one (since we only get that information when we need to save it).

On the topic of saving, the existing save_config function in the ControlReceiver class could take care of this. If given another argument file_name, it could save a new file if none exists or perform the existing rolling backup code if it does.

from sights.

Conr86 avatar Conr86 commented on July 21, 2024

Good thinking! Definitely a good way to do this. Would you also want a delete config button? And in that case, how do we handle it?

from sights.

WilliamsJack avatar WilliamsJack commented on July 21, 2024

Hmm, I didn't think of that, but it's a good idea. Will Delete delete the currently active config?
I'd say the receiver can still do it, we'd just need a new command - unless you had a different way in mind?

Both Save as and Delete could automatically refresh the config list dropdown.

from sights.

Conr86 avatar Conr86 commented on July 21, 2024

I feel like it would be easier and safer to only allow the user to delete non-active configs. This means there is always at least one valid config file.

We could probably have either a separate "Delete Config" pop up menu with a basic list of configs with a delete button for all but the active config, or (it's probably not possible, but) integrate it into the config selector like this (excuse the ms paint):
image

from sights.

WilliamsJack avatar WilliamsJack commented on July 21, 2024

That would be much better. It's definitely possible to add a button to a dropdown, but I think we'd have to make our own rather than using the <select> tag.

from sights.

WilliamsJack avatar WilliamsJack commented on July 21, 2024

Created a new feature request for deleting. Seems appropriate to track it separately since this issue will be closed once the save-as branch is merged.

Edit: Apologies, #52 is the issue.

from sights.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.