-
Notifications
You must be signed in to change notification settings - Fork 35
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
add support for Flags #41
Conversation
The commits in this branch add support for the features listed in issue aviaviavi#8. The branch needs some documentation, and maybe some code editing or refactoring before integration to master.
The -Wall option turns on most warnings, but not all of them. -Wcompat enables warnings that make your code more robust in the face of future backwards-incompatible changes. https://lexi-lambda.github.io/blog/2018/02/10/an-opinionated-guide-to-haskell-in-2018 https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/using-warnings.html#warnings-and-sanity-checking
Well spotted! 👍
… Le 31 oct. 2018 à 18:14, Avi Press ***@***.***> a écrit :
@aviaviavi commented on this pull request.
In app/Types.hs:
> @@ -1,12 +1,19 @@
-{-# LANGUAGE DeriveAnyClass,
I'm not sure exactly how, but one of these extension changes is causing the issue with deleting TODO's. When I tried this locally, the issue was that the server expects the delete request to be simply an array of ints, because DeleteTodoRequest is a newtype and the FromJSON is being automatically derived.
The quick fix: not deriving FromJSON and instead declared the instance separately, things started working. ie
newtype DeleteTodoRequest = DeleteTodoRequest
{ ids :: [Integer]
} deriving (Show, Generic)
instance FromJSON DeleteTodoRequest
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great change, just 1 point of feedback. Sorry for all the merge conflicts from that previous refactor by the way.
hello Avi,
On 01/11/2018 04:55, Avi Press wrote:
------------------------------------------------------------------------
In app/Config.hs
<#41 (comment)>:
> @@ -34,6 +36,7 @@ argParser = ToodlesArgs
, limit_results = def &= help "Limit number of search results"
, port = def &= help "Run server on port"
, no_server = def &= help "Output matching todos to the command line and exit"
+ , userFlag = def &= help "Additional flagword (e.g.: MAYBE)"
How does one specify multiple flags? If it's possible it would be good
to call out here
I just works out of the box : you can use `-u YOURFLAG` as many times as
needed.
…--
[Citation aléatoire]
We seem to be spending more of our resources on high-priced arguments
about trivial "inventions" than on creating new ones.
-+- Brian Kernighan -+-
|
On 01/11/2018 04:55, Avi Press wrote:
In web/html/index.html
<#41 (comment)>:
> @@ -134,6 +135,7 @@
<td class="todo-item-priority" >
<div v-show="todo.priority !== undefined">{{ todo.priority }}</div>
</td>
+ <td class="todo-item-flag" >{{ todo.flag }}</td>
I think it would also be good for the filter text input box also
filtered based on the flag, should be a small change, if you don't
mind (on line 133)
If you don't mind, please could you do this change? I am not a web
developer, and I am not sure how to do this :-[.
thank you,
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thank you!
Not at all, will do that. :) I actually had already deleted that comment when I remembered you mentioned this |
Great! Thank you!!
|
This pull request supports issue #8. It adds the following changes:
-u
).Help needed:
Since the merge with master, the delete function no longer works. I am not fluent with JavaScript and need your help to debug this. While merging with master, I spotted probably bugous behaviours in the UI. See issues #39 and #40. The "deletion problem" in this branch could be related to those issues, or not.