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
Enhance the bills extractor #118
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dropdowns with modal for events.
Support AllDay events. The class is growing in number of atributes. Some are mandatory, like start date-times, title, description, ... while others are optional. So the constructor now only has the essential parameters. Everything else can be set via setters. These are kinda special because they return the object itself, allowing for chaining. ``` new CalendarEvent( title, desc, isHTML, start, end ).setLocation(loc) .setStatus(CalendarEventStatus.FREE); ```
fabiodrg
force-pushed
the
refactor/bills-extractor
branch
from
April 2, 2022 22:33
b251ca7
to
5669942
Compare
This was
linked to
issues
Apr 2, 2022
6 tasks
Enforce some rules that are common in all extractors
Enhance the implementation for `chrome.storage.local.get` for matching the API interface and behaviour. The return simulates that nothing exists in storage, thus Extractors will use their default values. In the previous implementation the Extractors atributes/parameters were never initialised, reducing the testing scope
objects at runtime The function `_validateEventParams` receives an object that should have all properties declared in the extractor `structure.properties`. It is used to format strings such as event title, description, etc. The properties may declared nested objects when the name is like `room.name`, meaning the `room` is an object with at least the property `name`. Validating nested objects is now supported.
format strings Previous implementation would only escape newlines if the format-strings are in HTML. However, it would only escape the first occurence, as `replace` stops on the first occurance. The alternative `replaceAll` is still not widely available, therefore we keep `replace` but use a regex pattern with the global (g) flag. It also escapes newlines for plain text string-formats. Escapping is necessary when the string-format looks like this: `hello '${p1}\n${p2}'`. As the `\n` is not escaped and it is between single quotes, `'`, it the eval will fail as single and double quotes do not work with multi-line strings.
generated ATM references
A todo list to complete this PR:
|
generated payment references
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
CalendarEvent
location
,status
, ... can be initialised with setters that return the object itself allowing for chaining in constructor invokingCalendarUrlGenerator
to generate URLs that toggle the "All Day" in the event edit form on target platforms (Google, Microsoft, Yahoo)Bills
extractorEventExtractor
BillsPaymentRefs
chrome.storage.local.get
, so thatExtractor.init
completes and initialises with default valuesdocument
global object on unit tests #90Preview
"Events Modal" for pending bills and pending bills with ATM references
Events can be created as 'All Day' events, which is more indicated for 'reminder'-like events. Supported in online calendars, like Google, Microsoft and Yahoo. iCalendar formats also working in tested clients