Code Monkey home page Code Monkey logo

autoshare-for-twitter's People

Contributors

barneyjeffries avatar bmarshall511 avatar cadic avatar dependabot[bot] avatar dinhtungdu avatar dkotter avatar faisal-alvi avatar github-actions[bot] avatar helen avatar iamdharmesh avatar jeffpaul avatar johnwatkins0 avatar justinmaurerdotdev avatar kmgalanakis avatar nguyen26052004 avatar peterwilsoncc avatar rahulsprajapati avatar ravinderk avatar sidsector9 avatar thrijith avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

autoshare-for-twitter's Issues

Add a plugin release command/process

The plugin release command should:

  • Prepare the plugin for distribution, creating a release folder that contains only the files needed to run the plugin.
  • Include only vendor dependencies used in the plugin.
  • The release-zip command should prepare a plugin zip ready for uploading.

Polish readme for .org release [2 hrs.]

  • update versions, tested up to
  • update authors: credit scott lee, adam silverstein?
  • add setup instructions
  • create README.md copy for github repository
  • Bump version everywhere to 1.0.0

WP filter unnecessarily applied twice

Describe the bug

The autoshare_for_twitter_tweet filter appears twice within a few lines in the same function. This is definitely a copy+paste error rather than intentional.

download

Steps to Reproduce

Find the redundant filter in the class-publish-tweet.php file.

Handling of shortlinks

Describe the bug
Originally reported by @rickalee: #57 (comment)

Client just had a permalink with 165 characters that truncated post title. I see the 'autoshare_for_twitter_post_url' filter but I think we should add a Setting to use shortlinks i.e. example.com/?p=1234

Original response by @jeffpaul: #57 (comment)

@rickalee using shortlinks, as an option, seems to make sense. Though I'm surprised that Twitter itself didn't shorten the link with their t.co link shortener, I wonder if there's a way to trigger that via their API so we don't need to worry about adding a setting for that in the plugin and just let Twitter shorten things on their end?

Sidebar: let's move this into a separate issue to discuss link shortening.

Steps to Reproduce

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

If a link to the post/page/whatever is included in our tweet status, then my assumption is those links (if they're longer than the t.co links) will be shortened to the t.co link when posted to Twitter.

Screenshots

n/a

Environment information

  • Device:
  • OS:
  • Browser and version:
  • WordPress version:
  • Plugins and version:
  • Theme and version:
  • Site Health Info:

Additional context

Related to #57

Add colour coding for icons

Is your enhancement related to a problem? Please describe.
Faster identification of posts which need Tweeting. Use different color codes on the Twitter icon for "default", "enabled", "tweeted", "disabled / not tweeted", and "error".

Describe the solution you'd like

Designs
Screen Shot 2019-12-12 at 3 58 43 PM

Describe alternatives you've considered
n/a

Additional context
Props to @linawiezkowiak and @oszkarnagy for the UX/Design work.

Release version 1.0.2

This issue is for tracking changes for the 1.0.2 release. Target release date: Thursday, March 12th.

Pre-release steps

  • Complete review of PR #84, resolve issues, and merge

Release steps

  • Branch: Starting from develop, cut a release branch named release/1.0.2 for your changes.
  • Version bump: Bump the version number in autoshare-for-twitter.php, readme.txt, composer.json, package-lock.json, and package.json if it does not already reflect the version being released.
  • Changelog: Add/update the changelog in CHANGELOG.md and readme.txt.
  • Props: update CREDITS.md with any new contributors, confirm maintainers are accurate.
  • Translations: Update the .pot file by running npm run makepot.
  • New files: Check to be sure any new files/paths that are unnecessary in the production version are included in .distgnore.
  • Readme updates: Make any other readme changes as necessary. CHANGELOG.md and README.md are geared toward GitHub and readme.txt contains WordPress.org-specific content. The two are slightly different.
  • Merge: Make a non-fast-forward merge from your release branch to develop (or merge the pull request), then do the same for develop into master (git checkout master && git merge --no-ff develop). master contains the stable development version.
  • Push: Push your master branch to GitHub (e.g. git push origin master).
  • Wait for build: Head to the Actions tab in the repo and wait for it to finish if it hasn't already. If it doesn't succeed, figure out why and start over.
  • Check the build: Check out the stable branch and test for functionality locally.
  • Release: Create a new release, naming the tag and the release with the new version number, and targeting the stable branch. Paste the changelog from CHANGELOG.md into the body of the release and include a link to the closed issues on the 1.0.2 milestone.
  • SVN: Wait for the GitHub Action to finish deploying to the WordPress.org repository. If all goes well, users with SVN commit access for that plugin will receive an emailed diff of changes.
  • Check WordPress.org: Ensure that the changes are live on https://wordpress.org/plugins/autoshare-for-twitter/. This may take a few minutes.
  • Close milestone: Edit the 1.0.2 milestone with release date (in the Due date (optional) field) and link to GitHub release (in the Description field), then close the milestone.
  • Punt incomplete items: If any open issues or PRs which were milestoned for 1.0.2 do not make it into the release, update their milestone to 1.0.3, 1.1.0, 2.0.0 or Future Release.

Escaped characters appearing in tweets

Describe the bug

Testing found escaped hyphen characters in tweets. There are likely other characters that would also be escaped.

download (1)

Steps to Reproduce

Needs to do some local testing to determine exactly where the issue derives.

Expected behavior

No escaped characters should be present in auto-generated tweets.

Tweet shared when unchecked

When autoshare_for_twitter_enabled_default filter enabled:

Steps to reproduce:

  • New Post
  • Leave 'Tweet this Post' checked
  • Save Draft
  • Uncheck 'Tweet this Post'
  • Save Draft/Publish
  • Tweets out Post

Update handling of network installation

Is your enhancement related to a problem? Please describe.
When the plugin is installed at the network level, we currently only display settings on the individual site level. We may want to consider having the majority of the plugin settings at the network level and the Twitter handle as the main option on an individual site level.

Describe the solution you'd like

  • keep Twitter handle on individual site settings page
  • move remaining settings to a network settings page

Designs

TBD, depending on conversation from details above.

Describe alternatives you've considered

Keep as-is with network activated plugin having settings completely at an individual site level.

Additional context

See related conversation with @henrywright starting here: #57 (comment).

Include featured image in tweet

Is your enhancement related to a problem? Please describe.

@adamsilverstein mentioned in #33, at some earlier stage of this plugin tweets included featured images, and that's no longer working.

Describe the solution you'd like

Screen Shot 2019-08-26 at 4 15 43 PM

Add a Webpack build process and initial App that loads in Gutenberg [4 hrs.]

Related: #2

  • Add skeleton webpack configuration.
  • Add skeleton app that to build with webpack.
  • App should live in a src folder, build should go to a dist folder.
  • Ensure built app javascript is loaded from php on the post editor when gutenberg is being used
  • needs to work with WordPress 5.0 + and ideally wp4.9 with the plugin enabled (although the GB project has officially dropped 4.9 support for the plugin, so this is less of a priority if compatibility is not straightforward.

Tweeting workflow

Is your enhancement related to a problem? Please describe.
Better system feedback for admins and more clarity on what will happen to reduce "surprises" and increase trust.

Describe the solution you'd like

  • Own standard slotfill, with default icon
  • If Tweeting is disabled, show but disable controls
  • Include featured image if specified
  • Label updates when enabled to say what it will do
  • Icon changes active state too, so that status can be seen (and read too) even if the slotfill is closed
  • Full Tweet message is always shown - enabling different editors to edit the message before (or after) publishing
  • Short warning when message getting long
  • Error when message is too long
  • Set max character for the text area, so that people can't enter longer Tweets
  • If there is a featured image specified show the same thumbnail as the "Featured Image" area
  • Remove featured image from Tweet
  • If featured image was removed but still exists - it can be enabled again
  • Show current featured image with 10% opacity underneath to know what the featured image is
  • State what the action will be, and use appropriate icon colour coding
  • Message controls available in open state
  • Disabled state copy and icon updated
  • Tweeted status shows date/time and link to the Tweet
  • A post can be Tweeted multiple times after publishing - even by a different editor
  • Post publishing state and icon set appropriately
  • Tweet now will expose controls and allow instant Tweeting
  • Message and settings should persist to allow multi-editor or dedicated social media person workflow
  • If a post has been Tweeted multiple times, the Tweet entries will stack
  • Edge-ish case when Post has been switched back to Draft from Published, and has already been Tweeted

Designs
DRAFT STATE
Default state:
Screen Shot 2019-12-18 at 10 28 23 PM

Disabled state:
Screen Shot 2019-12-18 at 10 29 03 PM

Disabled state with featured image:
Screen Shot 2019-12-18 at 10 29 32 PM

Enabled state:
Screen Shot 2019-12-18 at 10 30 03 PM

Enabled - length warning:
Screen Shot 2019-12-18 at 10 30 30 PM

Enabled - length error:
Screen Shot 2019-12-18 at 10 30 58 PM

Enabled - with featured image:
Screen Shot 2019-12-18 at 10 31 27 PM

Enabled - featured image removed:
Screen Shot 2019-12-18 at 10 31 55 PM

PRE-PUBLISH CHECKS
Pre-publish - Enabled:
Screen Shot 2019-12-18 at 10 32 22 PM

Pre-publish - Enabled & Open:
Screen Shot 2019-12-18 at 10 32 53 PM

Pre-publish - Disabled:
Screen Shot 2019-12-18 at 10 33 21 PM

PUBLISHED
Published - Tweeted:
Screen Shot 2019-12-18 at 10 33 48 PM

Published - Disabled:
Screen Shot 2019-12-18 at 10 34 10 PM

Published - Tweet now:
Screen Shot 2019-12-18 at 10 34 35 PM

Published - Tweeted multiple times:
Screen Shot 2019-12-18 at 10 34 58 PM

DRAFT & TWEETED
Draft (after being Published):
Screen Shot 2019-12-18 at 10 35 25 PM

Describe alternatives you've considered
n/a

Additional context
Props to @linawiezkowiak and @oszkarnagy for the UX/Design work.

Release 1.0.0

Continues #34

  • Merge: Make a non-fast-forward merge from your release branch to develop, then do the same for develop into master. master contains the stable development version.
  • Push: Push your master branch to GitHub, e.g. git push origin master.
  • Wait for build: Head to the Actions tab in the repo and wait for it to finish if it hasn't already. If it doesn't succeed, figure out why and start over.
  • Check the build: Check out the stable branch and test for functionality locally.
  • Git tag: Create the release as 1.0.0 on the stable branch in GitHub. It should now appear under releases and in the WordPress admin as an update as well.
  • Edit the 1.0.0 milestone with release date (in the Due date (optional) field) and link to GitHub release (in the Description field), then close 1.0.0 milestone
  • If any open issues or PRs which were milestoned for 1.0.0 do not make it into the release, update their milestone to 1.1.0 or Future Release

Test against WP 5.4

Is your enhancement related to a problem? Please describe.
Once WordPress 5.4 is released, we'll want to test Autoshare for Twitter to see if any incompatibility issues arise.

Describe the solution you'd like

  • test Autoshare for Twitter on WP 5.4
  • open issues for any incompatibilities noted in testing
  • resolve issues identified in testing
  • bump "tested up to" version
  • if code changes needed due to incompatibilities, ship a plugin release, otherwise use "Plugin asset/readme update" action to update "tested up to" version on .org repo

Designs
n/a

Describe alternatives you've considered
none

Additional context
none

Add acceptance tests

Is your enhancement related to a problem? Please describe.
As a follow on from #84, let's look to get acceptance tests to cover these two scenarios while similarly working to figure out why they occasionally fail in manual testing.

Describe the solution you'd like

  • A test that checked the autoshare box, saved the draft, unchecked the autoshare box, published the post, and verified no tweet was sent
  • A test that saved a draft with the autoshare box unchecked, checked the box on the following pageload, published the post, and verified that the tweet was sent

Designs

n/a

Describe alternatives you've considered

n/a

Additional context

n/a

Define minimum PHP/WP version requirements

It would be useful for contributors such as myself to know roughly which minimum PHP/WP versions this plugin will require when it is released. I'm not familiar with the usual decision-making process for 10up OS projects.

From an engineering perspective, although setting 7.0 as the minimum PHP version is preferable, writing 5.6-compatible code doesn't require much more effort. When it comes to WordPress, however, setting 5.0 as the minimum support version gives us tools that allow us to write simpler and more modern code, even when building classic-editor support.

But I'm sure there are other factors to consider.

I suggest that this be decided soon so it can be taken into account for the remaining 1.0.0 issues.

TODOs from readme.txt

Is your enhancement related to a problem? Please describe.
I noticed these TODOs within the readme.txt file and wanted to pull them into an issue to ensure we track them properly. I'm going to likewise remove these from the readme.txt.

Describe the solution you'd like

  • Reevaluate storing the Twitter credentials in the database OR do a environment check. There's potential for a local environment tweeting publicly if using a copy of the production database.
  • Allow for post types to opt into/out of the auto-tweeting.
  • Remove jQuery dependency
  • Gutenberg compatibility
  • Remove composer dependencies from the repo

Designs
n/a

Describe alternatives you've considered
none

Additional context
n/a

Improve meta box message UI [2 hrs.]

Especially the custom message area could use some polish:
image

  • add a progress or % indicator, perhaps modeled on twitter's, indicate when the entered text is getting close to the limit to help the user avoid going over. I'd love to see some design ideas for this.
  • other visual improvements?

Ability to customize order of tweet text, hashtags, and link

Is your enhancement related to a problem? Please describe.
As reported on Twitter, some people prefer to have their hashtags appear after the link in a tweet. So the request here is to able to customize the order in which the text of the tweet, the link in the tweet, and the hashtags for the tweet appear.

Describe the solution you'd like
This will be dependent upon UX review on best case experience to support this request. We'll identify implementation details once that analysis has been completed.

Designs

  • UX review for how this could be turned into a template / settings option

Describe alternatives you've considered
Keep as-is with hashtags appearing before the link.

Additional context
none

Plugin images missing

Describe the bug
Somewhere along the line #31 got overwritten such that the icon/banner images are no longer in the plugin. I'll submit a PR to add these back, hopefully the GitHub Action will kick in and push these across to .ORG. 🤞

Steps to Reproduce

  1. Go to https://wordpress.org/plugins/autoshare-for-twitter/
  2. See no icon or banner images

Expected behavior
.org plugin should display appropriate icon and banner images

Screenshots
n/a

Environment information

  • Device: Mac Mini (2018)
  • OS: macOS Mojave Version 10.14.6
  • Browser and version: Firefox 72.0.1
  • Plugins and version: n/a
  • Theme and version: n/a
  • Other installed plugin(s) and version(s): n/a

Additional context
n/a

Finding Tweeted posts

Is your enhancement related to a problem? Please describe.
Faster identification of posts which need Tweeting. Supporting multi-editor workflow:

  • Placement and persistence of Tweet message to support multi editor workflow
  • Configurable representation of Tweet status in Post listing
  • Configurable Tweet status filter

Describe the solution you'd like
Update the All Posts screen to:

  • add filters for "Tweeted" and/or "Not Tweeted"
  • add column for Tweeted status
  • add hover state for rows in Tweeted status column to show the Tweet date(s) and time(s) in a simple title attribute

Designs
Screen Shot 2019-12-13 at 7 20 16 PM

Describe alternatives you've considered
n/a

Additional context
Props to @linawiezkowiak and @oszkarnagy for the UX/Design work.

Ensure featured image is sent with tweet

Describe the bug

Steps to Reproduce

  1. Create a new post, setting a featured image.
  2. Publish the post.

Expected behavior

Expected results:
The featured image is used for the twitter post.

Actual results:
no image is sent with the twitter post.

https://twitter.com/adamtest110/

Add GitHub Action workflows for deployment

Is your enhancement related to a problem? Please describe.
Let's add the GitHub Action workflows to allow for automated deploys to WordPress.ORG.

Describe the solution you'd like

  • Add plugin deploy workflow
  • Add asset deploy workflow
  • Add user/pass secrets to repo settings
  • Add build step

Designs
n/a

Describe alternatives you've considered
keep deploying manually 👎

Additional context
n/a

Add filter to turn on autoshare by default on a per-post-type basis

Is your enhancement related to a problem? Please describe.

Autoshare is off by default with no way of turning it on by default. This enhancement will provide a way to opt post types in by default at the code level.

Describe the solution you'd like

A simple WP filter that can be hooked into by themes/other plugins. The value will be passed to JS and will set the default in the editor.

Designs

Describe alternatives you've considered

There should be a UI feature associated with this, but that can be part of #57.

Additional context

Installation and setup

Is your enhancement related to a problem? Please describe.
Better onboarding and easier setup - leading to better initial experience. Better control on behaviour:

  • Ability to define which post types will Autoshare be available on
  • Configurable default ON/OFF for posts
  • Ability to configure default featured image inclusion
  • Ability to tweet a post multiple times

Describe the solution you'd like

  • Prompt what the user needs to do after Activating the plugin (need to decide if Admin banner is best, necessary UX here)
  • Provide step-by-step instructions
  • Only show settings which are needed for initial setup
  • Branding and links to more in-depth help
  • Group configuration options by areas
  • Only show post types when "Selected content types only" is selected
  • Toggle connection settings inline

Designs
Activating the plugin:
Screen Shot 2019-12-13 at 7 26 22 PM
Initial setup:
Screen Shot 2019-12-13 at 7 28 25 PM
Configuration:
Screen Shot 2019-12-13 at 7 29 37 PM
Configuration - open states:
Screen Shot 2019-12-13 at 7 33 20 PM

Describe alternatives you've considered
n/a

Additional context
Props to @linawiezkowiak and @oszkarnagy for the UX/Design work.

Add develop branch, set as default, protect branches

Is your enhancement related to a problem? Please describe.
The current default branch is master.

Describe the solution you'd like

  • create a develop branch
  • set develop as the default branch
  • protect master and develop branches

Designs
n/a

Describe alternatives you've considered
none

Additional context
n/a

Add support for IndieWeb syndication links + backfeed

Is your enhancement related to a problem? Please describe.
In chatting with folks in the IndieWeb community, it was recommended that we consider adding Syndication Links and Backfeed support to Autoshare for Twitter. Adding support for Syndication Links seems more straightforward than Backfeed, mainly due to the fact that Twitter doesn't currently offer support for fetching a tweet's replies (or favorites). I've opened a ticket on the Twitter developers site to get more insight into that sort of API and whether it's on the roadmap, will update here as I get any updates.

Describe the solution you'd like

Designs

n/a

Describe alternatives you've considered

none

Additional context

Good support from the IndieWeb community is available in their Slack channel dedicated to WordPress.

Release version 1.0.1

This issue is for tracking changes for the 1.0.1 release. Target release date: Monday, February 3rd.

Release steps

  • Branch: Starting from develop, cut a release branch named release/1.0.1 for your changes.
  • Version bump: Bump the version number in autoshare-for-twitter.php, readme.txt, composer.json, package-lock.json, and package.json if it does not already reflect the version being released.
  • Changelog: Add/update the changelog in CHANGELOG.md and readme.txt.
  • Props: update CREDITS.md with any new contributors, confirm maintainers are accurate.
  • Translations: Update the .pot file by running npm run makepot.
  • New files: Check to be sure any new files/paths that are unnecessary in the production version are included in .distgnore.
  • Readme updates: Make any other readme changes as necessary. CHANGELOG.md and README.md are geared toward GitHub and readme.txt contains WordPress.org-specific content. The two are slightly different.
  • Merge: Make a non-fast-forward merge from your release branch to develop (or merge the pull request), then do the same for develop into master (git checkout master && git merge --no-ff develop). master contains the stable development version.
  • Push: Push your master branch to GitHub (e.g. git push origin master).
  • Wait for build: Head to the Actions tab in the repo and wait for it to finish if it hasn't already. If it doesn't succeed, figure out why and start over.
  • Check the build: Check out the stable branch and test for functionality locally.
  • Release: Create a new release, naming the tag and the release with the new version number, and targeting the stable branch. Paste the changelog from CHANGELOG.md into the body of the release and include a link to the closed issues on the 1.0.1 milestone.
  • SVN: Wait for the GitHub Action to finish deploying to the WordPress.org repository. If all goes well, users with SVN commit access for that plugin will receive an emailed diff of changes.
  • Check WordPress.org: Ensure that the changes are live on https://wordpress.org/plugins/autoshare-for-twitter/. This may take a few minutes.
  • Close milestone: Edit the 1.0.1 milestone with release date (in the Due date (optional) field) and link to GitHub release (in the Description field), then close the milestone.
  • Punt incomplete items: If any open issues or PRs which were milestoned for 1.0.1 do not make it into the release, update their milestone to 1.0.2, 1.1.0, 2.0.0 or Future Release.

Rename to `Auto Share for Twitter`

Is your enhancement related to a problem? Please describe.
After trying to submit our current v1 to the .org repo, we found that even with Twitter-required disclaimers within our code that the autotweet name isn't approved by WP. With some internal discussions complete, let's look to rename the plugin to Auto Share for Twitter. Let's make sure to review all the prior changes related to #22 as we work to, again, rename this project.

Describe the solution you'd like

  • rename GitHub repo
  • rename files
  • update references within files
  • update docs
  • update external blog post references

Designs

n/a

Describe alternatives you've considered

n/a

Additional context

Prior related issue: #22

Document Distributor integration [1 hr.]

When distributing a published post using Distributor as a draft, then publishing on the remote site, the post will contain meta from the original post, causing some issues:

The distributed post doesn’t automatically tweet because it thinks the post has already been tweeted (it checks the “twitter-status” post meta). The URL says it was tweeted from (the origin site), but it was really tweeted from the (the destination site) twitter account. The tweet URL is wrong because of the way it builds that URL.

Originally reported on 9to5 by Nate Allen.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.