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

Form for requesting premium version #336

Merged
merged 14 commits into from
May 27, 2020
Merged

Conversation

viktor-yakubiv
Copy link
Member

@viktor-yakubiv viktor-yakubiv commented May 18, 2020

Working on The form for requesting premium. Read commit messages for the detailed description.

402 as a base used for testing only. This must be merged to master first and #335 aligned after.

@vercel
Copy link

vercel bot commented May 18, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/oacore/dashboard/k71gpq284
✅ Preview: https://dashboard-git-request-premium-form.oacore.now.sh

@viktor-yakubiv
Copy link
Member Author

@Joozty could you please do some early review? It seems to be okay but needs to be prettified and properly integrated.

@viktor-yakubiv viktor-yakubiv force-pushed the request-premium-form branch from 5a4e0ef to c540f54 Compare May 21, 2020 12:09
viktor-yakubiv added a commit that referenced this pull request May 21, 2020
If there is no data, or an error happened:
* exporting functionality gets disabled;
* the table footer becomes hidden.

If the happened error is a Payment Required kind, the note
about payment is shown.
@viktor-yakubiv viktor-yakubiv force-pushed the request-premium-form branch from c540f54 to 84b7cc8 Compare May 21, 2020 14:19
@viktor-yakubiv viktor-yakubiv marked this pull request as ready for review May 21, 2020 14:19
@viktor-yakubiv viktor-yakubiv changed the base branch from 402 to master May 21, 2020 14:20
@viktor-yakubiv viktor-yakubiv added ♻️ refactoring Restructuring, cleaning up ✨ enhancement New feature or request 🐛 bug Something isn't working labels May 21, 2020
@viktor-yakubiv viktor-yakubiv self-assigned this May 21, 2020
@viktor-yakubiv
Copy link
Member Author

@Joozty I consider this finished and ready for the review. The first commit fixes a bug introduced by #337.

Although, I have to test UX of the form itself and consider @mcancellieri's remark that it's quite long. Also, I need to test actual form sending and see how it works, I missed a few hidden inputs and additional values to make it work.

components/forms/request-premium/index.jsx Show resolved Hide resolved
modules/billing/payment-required/data.js Show resolved Hide resolved
modules/billing/payment-required/data.js Outdated Show resolved Hide resolved
modules/billing/payment-required/index.jsx Outdated Show resolved Hide resolved
modules/billing/payment-required/data.js Show resolved Hide resolved
Add storing request error in a property if there is one.

Improves `404 Not Found` handling.

Adds `402 Payment Required` handling. Does not store the error
if no data found.
Passes error with the data if there is any.

If the error status is 402 but there is no data, error is cleared.
Some texts that are not written using markdown flavoured syntax
should be explicitly marked as plain text (*.txt).

However, we would like to support frontmatter for additional
information, so we reuse yaml-frontmatter-loader for *.txt files.
Adds a simple README file and Webpack resolver for the directory.
viktor-yakubiv added a commit that referenced this pull request May 27, 2020
If there is no data, or an error happened:
* exporting functionality gets disabled;
* the table footer becomes hidden.

If the happened error is a Payment Required kind, the note
about payment is shown.

Disables search if error appeared.
@viktor-yakubiv viktor-yakubiv force-pushed the request-premium-form branch from 0d4f28d to 14adfc3 Compare May 27, 2020 08:39
@viktor-yakubiv
Copy link
Member Author

@mcancellieri I wonder if you have time to review this. If you do not I have no other way than merge it as is. Go through the commits, most of them are just preparation for the feature that is integrated by the last one.

@oacore/front-end I still experience problems. The request-premium form appears only after page reload or on the second visit, i.e. when the deposit dates page was opened once, no error appears but on the second step it's shown.

Adds a letter template for requesting premium features for
an organisation.

Adds notes about free account.

Adds `letters` and `billing` modules into `texts`. Cross-integrates
new messages with `depositing` and `doi` text-modules.
The form constructs an email for requesting premium features.
The module controls billing, stores messages and forms for handling
paid-only features. It's connected to the global Store, uses every
single part of it.
viktor-yakubiv added a commit that referenced this pull request May 27, 2020
If there is no data, or an error happened:
* exporting functionality gets disabled;
* the table footer becomes hidden.

If the happened error is a Payment Required kind, the note
about payment is shown.

Disables search if error appeared.
@viktor-yakubiv viktor-yakubiv force-pushed the request-premium-form branch from 14adfc3 to cbd093f Compare May 27, 2020 15:07
@viktor-yakubiv
Copy link
Member Author

The request-premium form appears only after page reload or on the second visit, i.e. when the deposit dates page was opened once, no error appears but on the second step it's shown.

The bug is sorted.

There is another minor bug when you click on the row. The white sidebar appears, and it's not possible to close it. I would keep it for now and handle it later.

If there is no data, or an error happened:
* exporting functionality gets disabled;
* the table footer becomes hidden.

If the happened error is a Payment Required kind, the note
about payment is shown.

Disables search if error appeared.
@viktor-yakubiv viktor-yakubiv force-pushed the request-premium-form branch from 5e13b23 to aed8a4a Compare May 27, 2020 15:46
@viktor-yakubiv viktor-yakubiv merged commit 0f9b89d into master May 27, 2020
@viktor-yakubiv viktor-yakubiv deleted the request-premium-form branch May 27, 2020 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working ✨ enhancement New feature or request ♻️ refactoring Restructuring, cleaning up
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants