P5.js-web-editor: When changing a file name, sketch does not mark itself as unsaved

Created on 7 Sep 2018  路  9Comments  路  Source: processing/p5.js-web-editor

Nature of issue?

  • [X] Found a bug
  • [ ] Existing feature enhancement
  • [ ] New feature request

Details about the bug:

  • Web browser and version: Google Chrome | 68.0.3440.106聽(Official Build)聽(64-bit)
  • Operating System: Mac OSX
  • Steps to reproduce this:

    As discussed in #658,
  • Open an existing sketch, or save a new sketch
  • Open the sidebar
  • Click on the "v" next to a file name, and edit the file name
  • Hit enter or click outside of the text input
  • If you refresh the page, the old file name is still there. And since the sketch is not marked as unsaved, there is no warning that the sketch is unsaved.

Expected Behavior:

  1. Open an existing sketch, or save a new sketch
  2. Open the sidebar
  3. Click on the "v" next to a file name, and edit the file name
  4. Sketch is marked as "unsaved"
good first issue help wanted high bug

All 9 comments

In my opinion, the new file name should be saved automatically.

@bhawesh96 i think that i agree鈥攊 think the behavior matches how a desktop code editor works, and i like that.

@catarak I want to work on this but can not find where to start, can you help me ?

@catarak I would like to help with this issue, what needs to be done?

i just thought about this again, and i think that the whole sketch _shouldn't_ be saved when you change a file name. it should, however, mark that there are unsaved changes. so, to address your question @EOstling, what you can do is investigate why the sketch is not being marked as unsaved when a file name is updated.

Sounds good! I am on it!

@EOstling Are you still working on this?

@catarak I would like to contribute to this. May I?

Hi everyone, given the recent inactivity on this, I decided to attempt a solution. The PR above fixes this issue, and describes the solutions. Feedback much appreciated 鉂わ笍

Was this page helpful?
0 / 5 - 0 ratings

Related issues

slowizzm picture slowizzm  路  4Comments

maartenwijntjes picture maartenwijntjes  路  3Comments

hellonearthis picture hellonearthis  路  4Comments

GaurangTandon picture GaurangTandon  路  4Comments

catarak picture catarak  路  5Comments