Skip to content

Commit 48774e4

Browse files
committed
Applied min's feedback
1 parent fb25664 commit 48774e4

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

62-cell-id/cell-id.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ Use Option D for most human readable, but adds a corpus requirement to the id ge
250250
1. How is splitting cells handled?
251251
- One cell (second part of the split) gets a new cell ID.
252252
2. What if I copy and paste (surely you do not want duplicate ids...)
253-
- On paste, give the pasted cell a new ID. The copied (source) cell keeps its original ID.
253+
- A cell in the clipboard should have an id, but paste always needs to check for collisions and generate a new id if and only if there is one. The application can choose to preserve the id if it doesn't violate this constraint.
254254
3. What if you cut-paste (surely you want to keep the id)?
255255
- On paste give the pasted cell a different ID if there's already one with the same ID as being pasted. For cut this means the id can be preserved because there's no conflict on resolution of the move action. This does mean the application would need to keep track of the ids in order to avoid duplications if it's assigning ids to the document's cells.
256256
4. What if you cut-paste, and paste a second time?
@@ -264,7 +264,7 @@ Use Option D for most human readable, but adds a corpus requirement to the id ge
264264
8. If a cell is cut out of a notebook and pasted into another, should the cell ID be retained?
265265
- This will depend on the application for now, as this JEP only focuses on Cell ID within an individual notebook. Different applications might handle pasting cells across notebooks differently.
266266
9. What are the details when splitting cells?
267-
- The JEP doesn't explicitly constraint how this action should occur, but we suggest one cell (preferably the one with the top half of the code) keeps the id, the other gets a new id. Each application can choose how to behave here so long as the cell ids are unique and follow the schema.
267+
- The JEP doesn't explicitly constraint how this action should occur, but we suggest one cell (preferably the one with the top half of the code) keeps the id, the other gets a new id. Each application can choose how to behave here so long as the cell ids are unique and follow the schema. This can be a per-application choice to learn and adapt to what users expect, without requiring a new JEP.
268268

269269
## Pros and Cons
270270

@@ -277,8 +277,10 @@ Pros associated with this implementation include:
277277

278278
Cons associated with this implementation include:
279279

280-
- lack of UUID and a "notebook-only" uniqueness guarantee makes merging two notebooks difficult without managing the ids so they remain unique in the resulting notebook
281-
- applications have to add default ID generation if not using nbformat (or not python) for this (took 1 hour to add the proposal PR to nbformat with tests included)
280+
- Lack of UUID and a "notebook-only" uniqueness guarantee makes merging two notebooks difficult without managing the ids so they remain unique in the resulting notebook
281+
- Applications have to add default ID generation if not using nbformat (or not python) for this (took 1 hour to add the proposal PR to nbformat with tests included)
282+
- Notebooks with the same source code can be generated with different cell ids, meaning they are not byte equal. This will make testing / disk comparisons harder in some circumstances
283+
- Pasting / manipulating cells needs to be aware of the other cells in a notebook. This increases the complexity for applications to implement Jupyter notebook interfaces
282284

283285
## Relevant Issues, PR, and discussion
284286

0 commit comments

Comments
 (0)