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

[PR-23489] [Documentation] Fix indentation #351

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,41 @@ Here is a reference to "talkable section": :ref:`talkable-section` which will ha
name "Talkable Section".
```

### Coding Guidelines for Documentation

#### General Formatting Rules

1. **Directives (`..` syntax)**:
- All directives starting with `..` (e.g., `.. image::`, `.. note::`) must have **2 spaces** indentation for their content. Examples:
Copy link
Member

@zhuravel zhuravel Jan 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you choose 2 spaces? I prefer 3 and this what we most commonly have.
I chose 3 because that’s what RST documentation uses everywhere and what looks best.
https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html

cc @wrimer

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the reStructuredText (RST) documentation, there are no strict rules mandating the use of 2 or 3 spaces for indentation. In our project, I didn’t see a significant advantage to using 3 spaces.

Therefore, I decided to standardize on 2 spaces because it’s the minimal value and the quickest to write.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Buritos16 Okay. You still have 3 spaces here:

https://github.com/talkable/talkable-docs/blob/4f74b18f26d699ac2aceba2a0dace30a79812fec/source/advanced_features/google_login.rst#L87-L88
https://github.com/talkable/talkable-docs/blob/4f74b18f26d699ac2aceba2a0dace30a79812fec/source/advanced_features/passing_custom_data.rst#L82-L85
https://github.com/talkable/talkable-docs/blob/4f74b18f26d699ac2aceba2a0dace30a79812fec/source/campaigns/editor/videos.rst#L47-L49
https://github.com/talkable/talkable-docs/blob/4f74b18f26d699ac2aceba2a0dace30a79812fec/source/integration/ecommerce_platforms/shopify.rst#L313-L315
https://github.com/talkable/talkable-docs/blob/4f74b18f26d699ac2aceba2a0dace30a79812fec/source/partials/common.rst

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zhuravel If needed, I can switch to 3 spaces.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switch those places I’ve mentioned to 2 spaces as everywhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


```rst
.. image:: /_static/img/example.jpg
:alt: Example Image

.. note::
This is an important note.
```

2. **Meta Directives (`.. meta::`)**:
- For `.. meta::` blocks, use **3 spaces** for the content indentation. Example:

```rst
.. meta::
:description: This is an example of a meta directive.
Buritos16 marked this conversation as resolved.
Show resolved Hide resolved
```

3. **Code Blocks (`.. code-block::`)**:
- Code inside `.. code-block::` must have **2 spaces** indentation. Example:

```rst
.. code-block:: html
<h1>Hello world!</h1>
```

#### Empty Line at the End of Files

Always ensure there is a blank line at the end of each file to adhere to formatting standards.

Build the documentation
-----------------------

Expand Down
112 changes: 56 additions & 56 deletions source/advanced_features.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,85 +12,85 @@ and make your referral program incredibly easy to manage. Here’s an overview o
each with links to integration details.

.. list-table::
:widths: 35 65
:widths: 35 65

* - :ref:`Automatic Coupon Creation <advanced_features/coupons>`
- Issue single and multi-use coupons for your campaigns
* - :ref:`Automatic Coupon Creation <advanced_features/coupons>`
- Issue single and multi-use coupons for your campaigns

* - :ref:`Shopify Coupon auto-sync <advanced_features/shopify_coupons_auto_sync>`
- Issue coupons automatically for your Shopify store
* - :ref:`Shopify Coupon auto-sync <advanced_features/shopify_coupons_auto_sync>`
- Issue coupons automatically for your Shopify store

* - :ref:`Shopify Coupon auto-apply <advanced_features/shopify_coupons_auto_apply>`
- Issue coupons automatically for your Shopify store
* - :ref:`Shopify Coupon auto-apply <advanced_features/shopify_coupons_auto_apply>`
- Issue coupons automatically for your Shopify store

* - :ref:`Shopify Purchase Syncing <advanced_features/shopify_purchase_syncing>`
- Automatic purchases synchronization from your Shopify store
* - :ref:`Shopify Purchase Syncing <advanced_features/shopify_purchase_syncing>`
- Automatic purchases synchronization from your Shopify store

* - :ref:`Referral Tracking Methods <advanced_features/track_methods>`
- See how Talkable tracks referrals and what data is used in the tracking process
* - :ref:`Referral Tracking Methods <advanced_features/track_methods>`
- See how Talkable tracks referrals and what data is used in the tracking process

* - :ref:`Advocate Personal Coupon Sharing <advanced_features/personal_coupon_sharing>`
- Find out how to add personal coupon sharing into a Talkable campaign in addition to link sharing
* - :ref:`Advocate Personal Coupon Sharing <advanced_features/personal_coupon_sharing>`
- Find out how to add personal coupon sharing into a Talkable campaign in addition to link sharing

* - :ref:`Convert static copy into Localization <advanced_features/converting_into_localization>`
- Convert all static languange into a customizable copy that’s
easy to AB test.
* - :ref:`Convert static copy into Localization <advanced_features/converting_into_localization>`
- Convert all static languange into a customizable copy that’s
easy to AB test.

* - :ref:`Сustomer Service Portal <advanced_features/customer_service_portal>`
- Explore full details for each individual customer and their referral journey,
manage their rewards and deliver excellent customer service.
* - :ref:`Сustomer Service Portal <advanced_features/customer_service_portal>`
- Explore full details for each individual customer and their referral journey,
manage their rewards and deliver excellent customer service.

* - :ref:`Params encryption <advanced_features/params_encryption>`
- For additional security, it is possible to encrypt Advocate, Friend and Loyalty member emails on back-end,
as well as their custom properties.
* - :ref:`Params encryption <advanced_features/params_encryption>`
- For additional security, it is possible to encrypt Advocate, Friend and Loyalty member emails on back-end,
as well as their custom properties.

* - :ref:`File encryption <advanced_features/file_encryption>`
- For additional security, it is possible to encrypt files.
* - :ref:`File encryption <advanced_features/file_encryption>`
- For additional security, it is possible to encrypt files.

* - :ref:`Report password protection <advanced_features/report_password_protection>`
- For additional security, reports have password protection by default.
* - :ref:`Report password protection <advanced_features/report_password_protection>`
- For additional security, reports have password protection by default.

* - :ref:`Including Product Items <advanced_features/product_items>`
- Let your customers share specific items that they’ve purchased
and pass product details along with purchase data
* - :ref:`Including Product Items <advanced_features/product_items>`
- Let your customers share specific items that they’ve purchased
and pass product details along with purchase data

* - :ref:`Integrating Events <advanced_features/events>`
- Fits SaaS, subscription-based, and other businesses that require integrating
additional events to build more advanced referral logics on top of regular
purchases.
* - :ref:`Integrating Events <advanced_features/events>`
- Fits SaaS, subscription-based, and other businesses that require integrating
additional events to build more advanced referral logics on top of regular
purchases.

* - :ref:`Pass custom user data <advanced_features/passing_custom_data>`
- Pass additional data to Talkable to operate with it inside campaigns
* - :ref:`Pass custom user data <advanced_features/passing_custom_data>`
- Pass additional data to Talkable to operate with it inside campaigns

* - :ref:`Phone number gating <advanced_features/phone_number_gating>`
- Collect customers' phone numbers and sync with ESPs.
* - :ref:`Phone number gating <advanced_features/phone_number_gating>`
- Collect customers' phone numbers and sync with ESPs.

* - :ref:`Referrals Approval <advanced_features/referrals_approval>`
- Learn about Talkable Fraud settings, why they are important
and how to find a right Fraud Profile that works best for your site.
* - :ref:`Referrals Approval <advanced_features/referrals_approval>`
- Learn about Talkable Fraud settings, why they are important
and how to find a right Fraud Profile that works best for your site.

* - :ref:`Segments <advanced_features/segments>`
- Brings more power and flexibility into segmenting your reporting
* - :ref:`Segments <advanced_features/segments>`
- Brings more power and flexibility into segmenting your reporting

* - :ref:`Subscribing to Talkable Iframe events <advanced_features/subscribing_to_events>`
- Subscribe to Talkable Iframe events such as the campaign is loaded or closed and
perform some updates to your site based on them.
* - :ref:`Subscribing to Talkable Iframe events <advanced_features/subscribing_to_events>`
- Subscribe to Talkable Iframe events such as the campaign is loaded or closed and
perform some updates to your site based on them.

* - :ref:`Setting up Campaign Placement criteria <advanced_features/reg_ex>`
- Walking through a Campaign Placement criteria setup that can support multiple
matching techniques
* - :ref:`Setting up Campaign Placement criteria <advanced_features/reg_ex>`
- Walking through a Campaign Placement criteria setup that can support multiple
matching techniques

* - :ref:`Using URL Parameters <advanced_features/url_parameters>`
- Override some of the parameters right through URL query string
* - :ref:`Using URL Parameters <advanced_features/url_parameters>`
- Override some of the parameters right through URL query string

* - :ref:`UTM Tags <advanced_features/utm_tags>`
- Brings more power and flexibility into segmenting your reporting by UTM tags
* - :ref:`UTM Tags <advanced_features/utm_tags>`
- Brings more power and flexibility into segmenting your reporting by UTM tags

* - :ref:`White Labeling <advanced_features/white_labeling>`
- Change all visible URLs to your domain instead of talkable.com
* - :ref:`White Labeling <advanced_features/white_labeling>`
- Change all visible URLs to your domain instead of talkable.com

* - :ref:`Multi-Currency <advanced_features/multi_currency>`
- Accept multiple currencies and set different rewards per currency
* - :ref:`Multi-Currency <advanced_features/multi_currency>`
- Accept multiple currencies and set different rewards per currency

.. container:: hidden

Expand Down
4 changes: 2 additions & 2 deletions source/advanced_features/converting_into_localization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ A piece that we are going to extract into Localizations is just a copy, without

.. warning::

Talkable does not allow coding up Localizations within CSS area. If you want to move some CSS property into localizations use inline <style> tag inside HTML area.
Talkable does not allow coding up Localizations within CSS area. If you want to move some CSS property into localizations use inline <style> tag inside HTML area.

Moving Subject Line Into Localization
-------------------------------------
Expand Down Expand Up @@ -194,4 +194,4 @@ In order to chieve this AB test we need to

.. container:: hidden

.. toctree::
.. toctree::
18 changes: 9 additions & 9 deletions source/advanced_features/coupons.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ There are several steps that need to be taken for this scenario:

.. raw:: html

<h2>REST API to Create Coupons</h2>
<h2>REST API to Create Coupons</h2>

Talkable can create coupons via a webhook using your REST API endpoint.
Read :ref:`Create Coupon Webhook Documentation <web_hooks/create_coupon>` for implementation details.
Expand All @@ -47,7 +47,7 @@ Read :ref:`Shopify coupon auto-sync documentation <advanced_features/shopify_cou

.. container:: hidden

.. toctree::
.. toctree::

Requirements
------------
Expand All @@ -59,18 +59,18 @@ Only the following characters are allowed in a coupon code:

.. code-block:: text

A-Z 0-9 - _ / . % : * + @ & #
A-Z 0-9 - _ / . % : * + @ & #

.. note::
Spaces are forbidden.
Spaces are forbidden.

Try to avoid ambiguous characters. This simple solution generates a string of easily readable characters for activation codes.
We do not want people confusing 8 with B, 1 with I, 0 with O, L with 1, etc.

.. code-block:: ruby

# Generates a random string from a set of easily readable characters
def generate_activation_code(size = 6)
charset = ["2", "3", "4", "6", "7", "9", "A", "C", "D", "E", "F", "G", "H", "J", "K", "M", "N", "P", "Q", "R", "T", "V", "W", "X", "Y", "Z"]
(0...size).map { charset[rand(charset.size)] }.join
end
# Generates a random string from a set of easily readable characters
def generate_activation_code(size = 6)
charset = ["2", "3", "4", "6", "7", "9", "A", "C", "D", "E", "F", "G", "H", "J", "K", "M", "N", "P", "Q", "R", "T", "V", "W", "X", "Y", "Z"]
(0...size).map { charset[rand(charset.size)] }.join
end
18 changes: 9 additions & 9 deletions source/advanced_features/customer_service_portal.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ excellent customer service.
Contents:

.. toctree::
:maxdepth: 2
:maxdepth: 2

customer_service_portal/overview
customer_service_portal/terminology
customer_service_portal/use_case_1
customer_service_portal/use_case_2
customer_service_portal/use_case_3
customer_service_portal/use_case_4
customer_service_portal/use_case_5
customer_service_portal/use_case_6
customer_service_portal/overview
customer_service_portal/terminology
customer_service_portal/use_case_1
customer_service_portal/use_case_2
customer_service_portal/use_case_3
customer_service_portal/use_case_4
customer_service_portal/use_case_5
customer_service_portal/use_case_6
6 changes: 3 additions & 3 deletions source/advanced_features/customer_service_portal/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ The Customer Service Portal provides a simple search box that will allow you to
If no county code is given, Talkable will try applying the USA and Canada codes and search with the resulting number.
- **Order number**: the order number of a purchase.
- **Coupon code**: the single-use coupon code issued as a reward to a referral program user.
- **Personal coupon code**: the :ref:`personal coupon code <advanced_features/personal_coupon_sharing>`, shared by an Advocate
- **Personal coupon code**: the :ref:`personal coupon code <advanced_features/personal_coupon_sharing>`, shared by an Advocate.

The search query might produce multiple results. In such case, every matched user will be listed,
showing some personal info (email and phone number) and, if present, other matched fields (i.e. order number and/or coupon code).
showing some personal info (email and phone number) and, if present, other matched fields (i.e., order number and/or coupon code).
To see more personal details, select a user from the list.

Example of Customer Service Portal person lookup:
Expand All @@ -33,4 +33,4 @@ Example of Customer Service Portal person lookup:

.. container:: hidden

.. toctree::
.. toctree::
61 changes: 31 additions & 30 deletions source/advanced_features/customer_service_portal/terminology.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,35 +12,36 @@ Advocate’s invite (a share). A referral will not be created unless the followi
Friend Email, and a Purchase made by a Referred Friend. Each referral is passed through several fraud checks
(configured inside Fraud Settings). As a result of the fraud checks each referral status can be:

1. **In progress**: Talkable referral engine is processing the referral. Such action usually takes less than a second
so it is highly unlikely that you will see this status. No rewards are issued at this point.

2. **Pending**: a referral is pending approval. Talkable referral engine approves pending referrals automatically
with a delay set under fraud settings. A user can also approve a referral manually until the auto-approval happens.
Thus, if the referral fraud checks were passed successfully each referral will eventually become approved.
No rewards are issued up until approval.

3. **Flagged**: due to having many different options to configure referral fraud checks,
it is not always possible to set up an automatic resolution for each referral.
For such cases, you may want to Flag referrals that are in a so-called grey area,
where the chance of fraud is around 50% and it is impossible to make the decision automatically.
All flagged referrals are added to a queue and can be accessed inside CSP → Referrals.
No rewards are issued at this point. All flagged referrals will be automatically resolved
to either voided or approved status, depending on the fraud settings configuration.
It is recommended to void flagged referrals automatically so you can only approve valid ones manually.
As a result this can save lots of time as most flagged referrals are rather suspicious than valid.

4. **Approved**: this is a valid referral status which either gets set by the Talkable referral engine
or by a user. Flagged referrals can also turn to approved. All rewards associated
with the referral are then passed to the next stage to verify if they
can be issued.

5. **Voided**: this status is set by a user manually if they decide a referral is invalid and there should be no
rewards issued as a result. Only pending and flagged referrals can be voided. Talkable referral engine cannot set
this status automatically. All rewards associated with the referral are getting blocked as a result.

6. **Blocked**: when some fraud checks are failed Talkable referral engine blocks the referral immediately. All rewards
associated with the referral are getting blocked as a result.
1. **In progress**: Talkable referral engine is processing the referral. Such action usually takes less than a second
so it is highly unlikely that you will see this status. No rewards are issued at this point.

2. **Pending**: a referral is pending approval. Talkable referral engine approves pending referrals
automatically with a delay set under fraud settings. A user can also approve a referral manually until
the auto-approval happens. Thus, if the referral fraud checks were passed successfully, each referral
will eventually become approved. No rewards are issued up until approval.

3. **Flagged**: due to having many different options to configure referral fraud checks,
it is not always possible to set up an automatic resolution for each referral. For such
cases, you may want to Flag referrals that are in a so-called grey area, where the
chance of fraud is around 50% and it is impossible to make the decision automatically.
All flagged referrals are added to a queue and can be accessed inside CSP → Referrals.
No rewards are issued at this point. All flagged referrals will be automatically resolved
to either voided or approved status, depending on the fraud settings configuration.
It is recommended to void flagged referrals automatically so you can only approve valid
ones manually. As a result, this can save lots of time as most flagged referrals are
rather suspicious than valid.

4. **Approved**: this is a valid referral status which either gets set by the Talkable referral engine
or by a user. Flagged referrals can also turn to approved. All rewards associated with
the referral are then passed to the next stage to verify if they can be issued.

5. **Voided**: this status is set by a user manually if they decide a referral is invalid and there
should be no rewards issued as a result. Only pending and flagged referrals can be voided.
Talkable referral engine cannot set this status automatically. All rewards associated
with the referral are getting blocked as a result.

6. **Blocked**: when some fraud checks are failed Talkable referral engine blocks the referral immediately. All rewards
associated with the referral are getting blocked as a result.

Reward
------
Expand All @@ -62,4 +63,4 @@ This is what the person gets as a result of some action (incentive). Available r

.. container:: hidden

.. toctree::
.. toctree::
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ This looks like a valid referral. Let’s move on to

.. container:: hidden

.. toctree::
.. toctree::
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ Here is what email statuses mean:

.. container:: hidden

.. toctree::
.. toctree::
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,4 @@ We identify this in the same way as described above.

.. container:: hidden

.. toctree::
.. toctree::
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ flagged/blocked ones. We see that the blocked reason in this case is “Matching

.. container:: hidden

.. toctree::
.. toctree::
Loading