Comment 45 for bug 722017

Revision history for this message
Mark Crutch (markc-qsiuk) wrote :

As a user who occasionally makes subsequent changes via a text editor in order to add scripting or animation that will work in a web browser, my preference would be for the following:

* Start with an auto-generated name and matching ID.

* If I specifically set a name for a gradient I would like that to be used as the ID. Using a human-readable name as the ID makes it easier to write and comprehend any subsequent script additions.

* Where the name is not valid as an ID, Inkscape would modify it based on clear rules (e.g. spaces replaced by underscores, or removed entirely and the name CamelCased).

* If the name is such that there is no sensible mapping to a valid ID it fall back to an auto-generated ID

* Names should be unique. If I try to enter the same name a second time it should have a suffix appended (e.g. Shimmering Gold (1), or Shimmering Gold #1). I doubt many users will complain about not being able to use precisely the same name for different gradients within a single document.

* Gradients imported from other documents should also be suffixed, if they would clash with existing names.

I understand that there is more to this than meets the eye, but those are my thoughts based on previously wrestling with Inkscape's auto-generated IDs in hand-coded Javascript (I ended up doing a search and replace to convert them to something more readable).