Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS: Add “Duplicate” post or "Copy post" functionality #9662

Closed
nozomimimi opened this issue Jun 28, 2018 · 9 comments · Fixed by #15460
Closed

iOS: Add “Duplicate” post or "Copy post" functionality #9662

nozomimimi opened this issue Jun 28, 2018 · 9 comments · Fixed by #15460
Assignees
Labels

Comments

@nozomimimi
Copy link

Expected behavior

Currently on the mobile app, "Duplicate post" functionality is not available. (It exists on Calypso, see the image below)
We should bring this functionality to the mobile app.

https://gyazo.com/0eb5ef47b7f9c8c333ce096ae30f8895

@cecilearkay
Copy link

Also asked by user on the French forums: link

@elibud
Copy link
Contributor

elibud commented Oct 9, 2020

+1 to adding this feature.

@designsimply
Copy link
Contributor

I also would benefit a lot from this feature on mobile! I use it all the time to post calls for testing. 😊

@designsimply designsimply changed the title iOS: Add “Duplicate” post functionality iOS: Add “Duplicate” post or "Copy post" functionality Oct 9, 2020
@designsimply
Copy link
Contributor

Found that we have designs for this already wordpress-mobile/WordPress-Android#7954 (comment), courtesy @osullivanchris. 👏

Duplicate Post iOS

@mindgraffiti
Copy link
Contributor

One thing to note.

  • copy is a reserved keyword in iOS. I suggest using duplicate everywhere, including in the UI, because that's the term Calypso uses. @osullivanchris wdyt?

@mindgraffiti
Copy link
Contributor

mindgraffiti commented Nov 18, 2020

Implementation hints:

@Gio2018 and I explored some classes related to cloning or copying. There is no duplication helper PostCoordinator or PostService, but there is one in AbstractPost, - (AbstractPost *)cloneFrom:(AbstractPost *)source, so that may be of some use.

You might also check out the reblog feature, where a new draft post is created and then the fields were added one-by-one from the original post. This worked out because there were not very many fields and some of them required processing (like adding quotes or a caption). Check out ReaderReblogPresenter.swift for details.

@osullivanchris
Copy link

copy is a reserved keyword in iOS. I suggest using duplicate everywhere, including in the UI, because that's the term Calypso uses. @osullivanchris wdyt?

that's totally fine with me, @mindgraffiti ! Copy can mean a lot of things. Duplicate sounds more clear and specific.

I hadn't heard of reserved keywords before, that's interesting to know too.

@mindgraffiti
Copy link
Contributor

@osullivanchris a reserved keyword is a word that the programming language already uses for OS-level work. Thankfully, it is rare to have a naming conflict like that. Most Swift keywords are not things you would normally use when naming your feature, such as: enum, for, if, else, subscript, var, const, struct. Think of it like naming your circles 'pixels' in a design, even though pixels are a measuring unit and not meant to describe a shape.

@wpericam
Copy link

3523700-zd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants