Comments (18)
Thanks @erics118. It seems like I'm not the only one perplexed by the behavior of this extension, which I understand is downstream of @blakeembrey's change-case library.
I'd really like something functional though; when I was an Alfred user, I used @derickfay's case converter workflow, and it worked as expected.
I'd really like Raycast's Change Case extension to be the best of them all β even if that requires some work. While I can't code for shit, I'm happy to work through how to improve the current functionality to match user expectations if you're up for it? Perhaps by adding some preferences, as @pernielsentikaer has proposed elsewhere?
from extensions.
I've made the PR, #12586 . Please take a look at the README.md file, where I added some clarification regarding behavior.
One thing I'm not too sure about-should I enable this preference as a default? This would change the workflow of some users (likely more advanced users) who use the context-aware tranformations.
On the other hand, there have been a lot of issues regarding the "incorrect" behavior of the transformations
#10594 #11867 #11150 #11382
from extensions.
@raycastbot keep this issue open
from extensions.
Thank you for opening this issue!
π @erics118 @pernielsentikaer @nagauta you might want to have a look.
π‘ Author and Contributors commands
The author and contributors of erics118/change-case
can trigger bot actions by commenting:
@raycastbot close this issue
Closes the issue.@raycastbot rename this issue to "Awesome new title"
Renames the issue.@raycastbot reopen this issue
Reopen the issue.
from extensions.
Here's my test file:
Change Case Tests.csv
from extensions.
See #10594 Feel free to add docs clarifying the behavior, or a preference to lowercase the text before other transformations
from extensions.
BTW, this is not my chance case library so any specific issues regarding the implementation of the algorithm should be posted in https://github.com/blakeembrey/change-case
from extensions.
Iβll still try to explain some of the patterns in the table
Capital case: this change case library also includes the ability to do convert between different cases, eg camel case to snake case, so this explains what you see in the mixed case tests.
Sentence case: it doesnβt perform an automatic lowercasin. See #10594
Title cae: Iβm not sure how title case is implemented, but again, no automatic lowercasing is done
Upper first: upper first is uppercase first of each line, so itβs working correctly. This also relates to a larger issue - there are some duplicated cases (eg two names for the same function) and some cases that I feel aren't too useful. It's pretty messy and I've considered potentially removing them. Also like here, upper first, is a pretty vague name and it's not clear what it really does. Perhaps I'll just remove it
from extensions.
Thank you, @chrismessina β I'm happy to lend a hand as long as it isn't useless, I'd also like to see Raycast's CC extension to be the best but I'm afraid of wasting my time...
from extensions.
I'm still interested β can we come together on a game plan? What would be most useful to start with?
from extensions.
@chrismessina I've added an option to first lowercase all text before further transformations. It seems to work more like what an average user would expect.
Here's a CSV file including your original csv file, and new rows underneath showing the new behavior. What do you think?
from extensions.
Thanks @erics118. I agree we should discuss defaults and user expectations.
The option you added defines what happens "out of the box", and the out of box behavior should align with the majority of users' expectations:
However, I'm not convinced that unchecked should be the default.
I see that you've added a lengthy explanation for the current default behavior to the Extension Store listing, which only amplifies this idiosyncratic behavior. If users install Change Case directly from the in-app Raycast Store, they'll never see this information.
I have filed a separate issue relating to the redundant cases to simplify this extension, but for now I propose lowercasing input by default, and then performing the transformation. Especially in the cases I outlined (Capital Case, Sentence Case, Title Case, and Upper First) the transformations will conform to the expectations set by the name of the transformation.
To that end, I have two mutually exclusive suggestions:
- Invert the behavior of your new checkbox; the text of the option should be "Preserve capitalization" and it should be unchecked by default.
- Remove the checkbox altogether and create new variant transformations for Capital Case, Sentence Case, Title Case, and Upper First that "Preserve capitalization".
It seems to me that Option 1 may be the simplest to implement, but may also introduce a breaking change for the 12K+ existing installs. Option 2 adds complexity but wouldn't break the current behavior.
WDYT?
from extensions.
I think that for simplicity, both for me as the developer, and for the user to understand what the how to configure the extension, we should go with option 1. I feel that Option 2 creates four additional transformations that clutter up the existing huge number of transformations available.
The major concern with this change is that users who frequently make use of transformations such as camelCase
-> snakeCase
(this use case has popped up in the Slack before), and I don't want their workflow to be completely messed up.
I think we can simply resolve this issue by making the preference required (which forces the user to make configure the preference before continuing to use the extension). The aforementioned users probably are well-versed enough to understand the change and the reasoning behind it. What do you think?
from extensions.
As long as the required option is not a checkbox, your suggestion works.
Thus you could rename "Behavior" to "Preserve capitalization" with an empty "Yes/No" dropdown, and a tip about impact of the choice.
Seems simple and straightforward.
from extensions.
What's wrong with a checkbox? I think I'm missing something
from extensions.
What's wrong with a checkbox? I think I'm missing something
How can you tell if the user made a selection?
That is, if it's required and unchecked by default, the extension can't know whether the user proactively made a choice, so you haven't really made the option "required".
The only way to make the choice "required" is to provide a "No choice" or unset option; as long as the option is unset, the "required" status is unfulfilled:
- No choice
- Yes
- No
from extensions.
Okay, I see.
But, what about the case when the user doesn't actually make a selection and goes with "No choice"?
from extensions.
Haha, well β the question we're trying to answer is: "how do we make setting a configuration option required?" But the extension should work w/o the user need to customize it, so let's revisit what you said above:
I think we can simply resolve this issue by making the preference required (which forces the user to make configure the preference before continuing to use the extension).
Perhaps we shouldn't make it required after all (again, because the extension should work automatically without configuration β people just want to change the case of their text!). It's only if they have more technical requirements (e.g. developers) that they'd look into the extension settings to see if "Preserve Original Capitalization" were offered).
So let's go back to Option 1:
Invert the behavior of your new checkbox; the text of the option should be "Preserve Original Capitalization" and it should be unchecked by default. It should not require user interaction to be set (and therefore shouldn't be "required").
I don't know if there's a way to communicate to the user that the default behavior has changed, but upon the next release, this new default should be enabled. Whether you check the box on behalf of existing installs to maintain consistent behavior is up to you β that is, if that's even possible.
from extensions.
Related Issues (20)
- YouTube Downloader HOT 3
- [YouTube Downloader] Download Failed Error HOT 2
- [YouTube Downloader] ... HOT 2
- not support robotjs
- [Plex] ... HOT 3
- [Coffee] Modify the "caffeinate for" command in Raycast to quickly close the main window immediately after the user presses Enter. HOT 1
- [Bitwarden Vault] When searching the vault, Other Items displayed before Favorites HOT 1
- [I Don't Have Spotify] Spotify link not being validated properly HOT 2
- [Coffee] Menu item only works when Raycast Settings is open HOT 1
- [Todoist] Error: Worker terminated due to reaching memory limit: JS heap out of memory HOT 3
- [Shell] Add input method? HOT 1
- [YouTube Downloader] ... HOT 2
- Download failed[YouTube Downloader] ... HOT 2
- [Two-Factor Authentication Code Generator] Implement backups or provide documentation on how to do so manually HOT 1
- [Pocket] Error creating bookmarks HOT 1
- [1Password] Item does not contain the field 'one-time password'. HOT 1
- [Spotify Player] ... HOT 2
- Claude HOT 1
- Input/Output presets [Set Audio Device] HOT 1
- [Raindrop.io] Add support for Vivaldi for "Save Browser Tab" feature 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 extensions.