Comments (9)
@dinhtungdu At an earlier stage the Composer dependencies were committed to the repo. Now that we have a build and deploy process and are .gitignoring the vendor
directory, I think that one is complete.
This plugin's Twitter integration is simple enough that the dependency (a pretty large package) could be fairly easily removed in favor of a simple API abstraction. Maybe that would be worth considering at a future stage.
Regarding jQuery, I agree there might be no need to spend time on that. The jQuery-dependent script only loads where the classic editor is being used, so it will always run where jQuery is available in the environment. The 5.0+ script doesn't use jQuery.
from autoshare-for-twitter.
@iamdharmesh Sound promising to me, can you work on a PR?
from autoshare-for-twitter.
@adamsilverstein leaving the checklist TODO items above for you to validate whether they're done or not and if not if they need to be split into their own issues to milestone in various releases.
from autoshare-for-twitter.
@jeffpaul Can you clarify this for me:
Remove composer dependencies from the repo
from autoshare-for-twitter.
Remove jQuery dependency
About this, do we really need to remove jQuery? Our plugin is run only in the admin area where jQuery is always loaded. I'm wondering if it worths the effort?
from autoshare-for-twitter.
@jeffpaul @johnwatkins0 for the first item, I'm wondering what is the best UX for it:
We detect local environment, prevent tweets and:
- Do nothing.
- Display a notice says that we don't tweet to Twitter when testing in the local environment.
- Change the text
Tweeted on 2020-02-11 @ 2:50AM
to something relevant to the localhost context. - Something I haven't thought about yet...
The first item:
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.
from autoshare-for-twitter.
Just thinking about what I would prefer as an engineer on a client project. Accidentally tweeting to a client's Twitter account from my local environment would be a bad day, so I can see why that note was added.
Perhaps the user could be asked to enter the site URL on the settings page. The label text could say the precise reason -- "Enter your site domain [or site home URL, and we can parse the domain out] to prevent Tweets from being sent in test environments."
from autoshare-for-twitter.
@dinhtungdu @johnwatkins0 I agree that we should find a way to try and prevent those sorts of accidental tweets. I'm curious what other plugins might have similar "prevent functionality from non-production environments" concerns to see how they're handling those scenarios. Any thoughts for plugins with similar concerns that we may be able to learn from?
from autoshare-for-twitter.
@dinhtungdu @jeffpaul We may get a reference from "WooCommerce Subscriptions" or JetPack Safe Mode.
I had checked on Woo Subscriptions earlier, it saves the site URL in the options table by inserting a key into the middle of the site URL(https://example.com
will be saved as https://ex_[autoshare_siteurl]_ample.com
) to prevent it by getting replaced during migrations. So, when the plugin detects a new site URL it shows the notice with actions for staging env and stops the automatic subscriptions, for our case we can stop tweet functionality.
Please let me know your thoughts on this.
Thanks.
from autoshare-for-twitter.
Related Issues (20)
- Enhance clarity of authentication instructions and error handling
- Only Scheduled Articles Post to Twitter After Update HOT 14
- Add PHP checks
- The Access Token and Access Token Fields missing in the connection setup. HOT 1
- E2E tests failing on WP trunk env.
- The plugin hasn't been tested with the latest version of WordPress
- Auto Sharing is not working HOT 2
- Does not Tweet the Edited Tweet when "Scheduled"
- Release version 2.1.1 HOT 2
- Failed to tweet; Malformed UTF-8 characters, possibly incorrectly encoded HOT 7
- 401 Unauthorized error when tweeting the same tweet to multiple accounts HOT 9
- Connect a twitter account button not working
- [Classic editor] Twitter accounts are hidden in the "Tweet Now" meta box.
- "Could not authenticate you." HOT 3
- Upgrade Cypress to version 13
- How to auto tweet when using wp_insert_post to programmatically add a post? HOT 2
- Uninstall flows
- auto sharing not working HOT 5
- WP Automatic posts not autoshared HOT 2
- The plugin hasn't been tested with an upcoming version of WordPress HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from autoshare-for-twitter.