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

Major Update in the Making - Help wanted #38

Open
pykong opened this issue Aug 6, 2017 · 5 comments
Open

Major Update in the Making - Help wanted #38

pykong opened this issue Aug 6, 2017 · 5 comments

Comments

@pykong
Copy link
Contributor

pykong commented Aug 6, 2017

@jdc0589 and all other who love this Sublime plugin
Find a major overhaul of CaseConversion in this fork: HERE

Updates include:

  • pythonized code: E.g. no more if x != None:
  • major refactoring of the parser. It is now class based, different functionalities like acronym detection have been cleanly separated into different methods.
  • also all string construction is now done in case_parse.py and all sublime logic kept in case_conversion.py. (This prepares these awesome string conversion capabilities to be applied in a different module. See stringase, EDIT: As of opening this issue I was unaware that the conversion function has already been factored out: https://github.com/AlejandroFrias/case-conversion)
  • added three new case conversions: to_lower_case, to_upper_case, to_capital_case. (See Issue 36)
  • case toggling can now be customized (See Issue 25). The user can determine what a target case a case should be converted to. Simply defining key: value pairs in the settings file under the point toggle_cases is enough.
    With key being the source case and the value being the target case. Default setting leaves toggling sequence as it was up until now.

I really like all Sublime users be able to profit from these improvements. Yet, before I open a pull request I still require help to improve, expand and test the code, because I do not understand the library good enough to do it alone. Here is what I need help with:

  • Acronym detection broke (and I do not know why):
    This still works:
    CaseConvertThisHTTP -> case_convert_this_http -> caseConvertThisHTTP
    This does not: 'http' is minced:
    HTTPtestArgh -> h_t_t_ptest_argh -> hTTPtestArgh

  • Extend method to determine all case types. (See line 271)
    The cleanest solution would be using a complete rewrite of the current method, which achieves case determination purely via regexp, instead of how case detection is handled right now.

Most Wanted Feature: Case Selection via Context Menu
As already discussed in Issue 26 an optional context menu to select different conversions would be highly useful. Especially since the number of cases has grown such menu would be very practical. Indeed I was half way through implementing this feature when hitting a road block. I am going to reimplement it once we are done with the open issues discussed.

Find the fork: HERE

@jdavisclark
Copy link
Owner

@bfelder thanks a bunch! you can go ahead and open up a PR if you'd like for tracking, and we just won't merge it until its ready.

I'll take a look through your fork tonight and see what I can go ahead and knock out.

@pykong
Copy link
Contributor Author

pykong commented Aug 7, 2017

@jdc0589 do not thank me, you were the one putting CaseConversion out there investing a lot of work up front!

I opened a PR for tracking purposes. (I am still learning to use GitHub).

Thanks for attending this issue so fast. It is good you are not one of the many devs who just abandon really good plugins for good.

Take your time have a look into the acronym and case detection. Then we see what to do next.

Regarding your time: Not seldom maintainers crunch their teeth when a major pull request is opened because suddenly out of nowhere they're confronted with a whole bunch of (uninvited) work (and often harmful feature creep). I do not know how you are thinking about it, still, be reassured: This will not be a neverending story because the work to be done in order to get CaseConversion to the next level is quite defined.

We need to do three things:

  • both areas of work discussed in this issue
  • new tests, e.g. for TravisCI
  • discuss the addition of a quick panel for case selection (I can implement that as well if you like to have this feature included, yet would need some help with region selection going wrong.)

@pykong
Copy link
Contributor Author

pykong commented Sep 4, 2017

@jdc0589 Can you give me an update? Did you make any progress resolving the two open problems with my PR? Do you need any information from my side?

@pykong
Copy link
Contributor Author

pykong commented Oct 8, 2017

@jdc0589 Any update?

@pykong
Copy link
Contributor Author

pykong commented Oct 29, 2017

@jdc0589 Do you had the chance to look into the PR, yet?

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

No branches or pull requests

2 participants