Skip to content

Save on firefox - #91

Closed
parteekcoder wants to merge 1 commit into
ControlCore-Project:mainfrom
parteekcoder:firefox_changes
Closed

parteekcoder wants to merge 1 commit into
ControlCore-Project:mainfrom
parteekcoder:firefox_changes

Conversation

@parteekcoder

@parteekcoder parteekcoder commented Feb 20, 2023 •

Copy link
Copy Markdown

@parteekcoder

parteekcoder commented Feb 20, 2023 •

Copy link
Copy Markdown
Author

Here due to this line https://github.com/ControlCore-Project/concore-editor/blob/main/src/graph-builder/graph-core/5-load-save.js#L124 even if user press cancel in prompt when asked for file name it will then also save the file, which is not a required property if user aborts

It should be like this

filename= prompt('Do something?');
if (filename=== null) {
return; //break out of the function early
}

@parteekcoder

Copy link
Copy Markdown
Author

For now time being i am not putting this code and limited my PR to required issue but once it is accepted may work on that also

@pradeeban

Copy link
Copy Markdown
Member

Please make sure the implementation mimics the behavior as it is implemented in Chrome. The Chrome implementation is the correct implementation.

So, the "Save" functionality should replace the open file.

To test it out, try the below sequence in Chrome and Firefox.

  1. Open the folder "concore/demo" through the Upload Folder option.
  2. Change sample2.graphml by editing an edge's name.
  3. Click "Save"

In Chrome, it will prompt and then replace the original file with the changed version. This is the expected behavior.
In your implementation for Firefox, it just downloads a copy to the Downloads directory.

We were aware of this complexity. This is why @Aviral09 chose to limit the support to Chrome/Edge only.

Same issue applies for the "Save" options of programs, too (python, matlab, ... program files).

The implementation will likely be more complex than a block of code to support Save in Firefox.

Please also tag @Aviral09 if you reattempt this PR.

@pradeeban pradeeban closed this Feb 20, 2023
@parteekcoder

parteekcoder commented Feb 20, 2023 •

Copy link
Copy Markdown
Author

Please make sure the implementation mimics the behavior as it is implemented in Chrome. The Chrome implementation is the correct implementation.

So, the "Save" functionality should replace the open file.

To test it out, try the below sequence in Chrome and Firefox.

  1. Open the folder "concore/demo" through the Upload Folder option.
  2. Change sample2.graphml by editing an edge's name.
  3. Click "Save"

In Chrome, it will prompt and then replace the original file with the changed version. This is the expected behavior. In your implementation for Firefox, it just downloads a copy to the Downloads directory.

We were aware of this complexity. This is why @Aviral09 chose to limit the support to Chrome/Edge only.

Same issue applies for the "Save" options of programs, too (python, matlab, ... program files).

The implementation will likely be more complex than a block of code to support Save in Firefox.

Please also tag @Aviral09 if you reattempt this PR.

yeah on chrome it is running as you told

But as I told early on firefox we currently have no other option as it not support window.showSaveFilePicker , And it is the requested feature from firefox @Aviral09

Refer:
https://developer.mozilla.org/en-US/docs/Web/API/Window/showSaveFilePicker

Screenshot_20230220_214928

@pradeeban

Copy link
Copy Markdown
Member

That is correct. Hence the decision to limit concore-editor support to Chrome/Edge at this point.

@parteekcoder

Copy link
Copy Markdown
Author

Hi @pradeeban , my this PR also solves issue #101

this issue #101 I have once mentioned to you in the chat , when we are discussing on firefox issue in some (PR chat or issue chat)

I thought that you want to keep this issue open for now that's why you closed my PR, but now you merged PR #103 for this

I had created a PR for this before
I just want to say that the issues and PR i am creating it takes a lot of time , but if that is not counted in my GSoC application then my efforts will go in vain

@pradeeban

Copy link
Copy Markdown
Member

Hi @parteekcoder,
Testing PRs take much longer as well. I know Aviral's suggestion of merging into dev, gsoc, or a throw-away branch. But that ruins the purpose and just delays the time it takes for testing.

Your efforts do not go in vain since you can always include the links to the issues/PRs in your GSoC proposal, merged or not.

I closed the issues when there were additional bugs introduced as a result of the PR or some PRs where multiple bug fixes were merged into a single PR. Please make sure to address just the bug at hand, rather than multiple at once. In this case, it was breaking the Save option of Chrome, to make it always "save as."

Open-source collaboration is also more about team work rather than competition. Usually, we will not have multiple people working on the same bug. It is a short-term situation due to GSoC.

@parteekcoder

Copy link
Copy Markdown
Author

yeah @pradeeban , it takes a lot of time to test the changes made by the contributors to approve

But I am really excited to be part of this project in GSoC this year

@pradeeban

Copy link
Copy Markdown
Member

Great, and we are excited to have you all here too!

I hope you take the overall experience as an open-source learning exercise. Please note there are more steps to the application process - including the actual proposal itself and your CV.

As per the GSoC policies, "you may submit up to three proposals. However, only one per GSoC Contributor may be accepted."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants