Comments (15)
This feature is now live on beta.dwitter.net! Check it out.
Implemented in this PR: dwitter-net/dwitter-frontend#81
I'll keep this issue open for a bit longer to allow for feedback and further discussion.
from dwitter.
I completely agree!
Incidentally, I was experimenting a bit with what that could look like in https://github.com/dwitter-net/dwitter-frontend (https://beta.dwitter.net), and this is what I came up with:
If there is interest I can package it up and start making some pull requests!
from dwitter.
I like the mockup! It would be great to have this as a feature, I'm sure seeing all this compressed code is confusing to novices.
from dwitter.
I like it.
Looking forward to the beta becoming the primary frontend.
from dwitter.
That would be cool! I've already hooked that up on http://dweetview.3d2k.com/ and http://dweetabase.3d2k.com/ for reference.
from dwitter.
The recent performance update actually does this internally, and it turned out to be pretty safe.
I think the only consideration is UX... if we do this automatically then it might seem a bit strange to newbies that some dweets are magically 194 characters. The possible ways to address this are either a secondary indication of some kind, or to make the decompression an explicit user action i.e a "decompress" button.
from dwitter.
I agree, this would be neat, but I worry about the UX. I much prefer that it's an explicit action, like a "decompress" button, as @ThomasBrierley mention.
Maybe it should come with an optional explainer pop up that explains how the compression works?
At that point do we add a "compress" button as well?
from dwitter.
Maybe it should come with an optional explainer pop up that explains how the compression works?
At that point do we add a "compress" button as well?
It's already quite hard to refrain from bumping up to 194 for me as a regular user, would a button make it too tempting and also too easy for newbies to appreciate the extra step involved?
Perhaps a link to a short explanation to read could act as a good "rite of passage"... maybe I am just in denial, it's true those extra 54 characters really open up the possibilities, but its still impressive when someone manages to cram something new and unique into 140 occasionally.
Option 3: Only add a decompress button, leave it as something to discover.
from dwitter.
If anyone is interested in taking on this, I'd be in favor of starting of with just a decompress button. Ideally subtle, and only visible when there is something to decompress. I think just replacing the code with the decompressed code might be ok?
Alternatively spit out the decompressed code below in a similar fashion to the "throw" trick
from dwitter.
I think we really do need to do something here, anything to make it clear what's under the encoding. I'll give this a go when I get an evening.
I believe presenting those outside of dwitter with a wall of unicode glyphs affects their appreciation and thus interest more than we realise. One of my colleagues initially thought the challenge was in encoding the unicode chars manually - which might sound silly, but you can imagine how offputting that sounds as a challenge.
from dwitter.
This is now live and functional. Closing issue :)
from dwitter.
Not sure why but compressing this dweet causes a crash (i assume because of non ascii characters)
In CapJS I added some extra stuff to replace any unicode characters so compression still works. Feel free free to use this as a starting point...
// replace unicode characters
const codeIn = [...codeMirrorEditor.getValue().trim()];
let code = '';
for (let character of codeIn)
{
const charCode = character.charCodeAt(0);
if (charCode > 255)
character = escape(character).replace(/%u/g,'\\u');
code += character;
}
from dwitter.
Yeah, @CiaccoDavide just fixed that but I haven't deployed it yet: dwitter-net/dwitter-frontend#100
That snipped might be helpful as well. Thanks!
from dwitter.
Deployed. Now it just gives you a warning which is more helpful than the old crash. But that particular dweet is still causing issues
from dwitter.
Continue discussion here: dwitter-net/dwitter-frontend#107
from dwitter.
Related Issues (20)
- should trigger load of dweet list before reaching the absolute bottom of the current buffer HOT 4
- Adding Dockerfile/instructions HOT 1
- Login form is vulnerable to Password Guessing Attack HOT 10
- Redirection vulnerability HOT 5
- A #spoiler suggestion HOT 3
- Suggestion: howto section HOT 2
- Suggestion: add the ability to list dweets by length HOT 3
- Initial character count is off HOT 1
- Bug when links in comments contain anchors
- Delete a comment HOT 1
- Twitter bot for dweets
- gif record not working HOT 1
- 1 Remixes? HOT 4
- Search bar?
- New concept for eliminating compression (280 byte limit) HOT 22
- Reset password email doesn't correctly display the reset link
- On beta site's random page, all dweets load with just 1 awesome HOT 1
- data URLs are blocked by CORS
- Eslint issue on running project
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 dwitter.