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

🏗 Development for V9 #87

Merged
merged 58 commits into from
Feb 5, 2024
Merged

🏗 Development for V9 #87

merged 58 commits into from
Feb 5, 2024

Conversation

chriskyfung
Copy link
Owner

@chriskyfung chriskyfung commented Dec 1, 2023

This pull request is for peer review of the coming library version 9.

New Feature

  • Allow moving downloaded files to other Google Drive folder via Google Sheet
  • Create custom menu and menu items in Google Sheets
  • Add new error codes to identify if the API request returns response in HTML instead of JSON:
    • 0xf3
      : Include not-logged-in in the HTML content
    • 0xf4
      : Other HTML responses

Bug Fixes

Refactors

  • Refactor nested if-else statements inside the fetch() function in src/fetcher.js
  • Renamed the html parameter to data inside the tryGetStories() function

Documentation

Under the configuration settings, the following changes were made:

- Bolded the terms' name.
- Unnested unnecessary bullet points.
- Added a note to remind the fields associated with Instagram API are
  always subjected to change and may not be up-to-date.
- Revised the descriptions for the following terms:
  **x-asbid-id**, **x-csrftoken**, **x-ig-app-id**, **x-ig-www-claim**,
  **x-instagram-ajax**, and **cookie**.
This commit fixes the error "TypeError: Cannot read properties of
undefined (reading 'split')" which occurs when applying the JavaScript
String split() to the `url` variable that is not a string object.

To prevent this error from occurring, an if-statement has been added to
check the type of the `url` variable and forces the callback return
immediately for non-string values.

This commit addresses issue #82.
This commit made the following changes to the fetch() function:

- Return immediatedly if no URLs are parsed from the API response data
- Use early return to continue urls.forEach loop if the URL is already
  existing in the log file
- Use || operator to set the value of the destinationFolder variable

This commit also made changes in:
- Updated semantic version from 4.2.0 to 4.2.1 in package.json
- Rebuilt `dist/bundle.js`
This commit adds a new feature that allows users to move selected items
to another Google Drive folder. The feature is accessible via the
custom menu and is easy to use. This change will help users to quickly
re-organize the downloaded files in their Google Drive.
- Renamed the `html` parameter to `data` inside the `tryGetStories()`
  function.
  The new name is more descriptive and accurately reflects the purpose
  of the parameter and help developers to quickly understand the code.

- Added new error codes to identify if the API request returns response
  in HTML instead of JSON:

  * 0xf3
    : Include `not-logged-in` in the HTML content
  * 0xf4
    : Other HTML responses

Bug fixes: #45
This commit updates the semantic version from `4.2.1` to `4.3.0` in `package.json`
@chriskyfung chriskyfung added bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request javascript Pull requests that update Javascript code labels Dec 1, 2023
@chriskyfung chriskyfung self-assigned this Dec 1, 2023
@chriskyfung chriskyfung marked this pull request as draft December 26, 2023 00:59
This commit locks the Jekyll version to 3.9.3 and adds the webrick gem
to fix a load error. It also includes the tzinfo-data gem for Windows
and JRuby compatibility.
This commit installs and sets up the Front Matter CMS extension for
Visual Studio Code, enabling seamless editing of `docs/` pages built
with Jekyll. The changes include:

- Installed the Front Matter CMS extension from the VS Code marketplace
- Configuring the extension to work with Jekyll
- Enabling start a Jekyll server within VS Code
This commit reorganizes and improves the `docs/` Jekyll pages with the
following changes:

1. Split the "Create Time-driven Trigger for Auto-Run", "Set Up Health
   Monitoring (Optional)", and "Deploy As a Web App (Optional)"
   instructions into a new page "Advanced Configurations"
   (advanced-configurations.md)
2. Created a new page "Release Notes" (release-notes.md) for the
   project history
3. Moved the section "How to find the values of `x-asbd-id`,
   `x-csrftoken`, `x-ig-app-id`, `x-ig-www-claim`, and `cookie`" to
   the "FAQ" section
4. Added emojis to H2-H3 headings
5. Added meta description to the index page (index.md)
6. Reduced the size of the "Google Sheet" button in the "How to Use"
   section
7. Replaced FontAwesome icons in the "Get Help" section with emojis
8. Rearranged the items in the "Get Help" section with an unordered list
9. Improved wording and sentences in the doc pages

These changes aim to enhance the structure, readability, and user
experience of the `docs/` Jekyll pages.
- Added emojis to H2-H3 headings
- Updated Table of Contents
- Wrapped the name of configuration options with code blocks
- Added "FAQ" section for easy reference
- Simplified instructions, added links to documentation webpage

These changes enhance the readability and navigation of the README,
making it more user-friendly and informative.
- Revised wordings for Breaking Changes (build2005a and build2006a)

This commit updates the CHANGELOG.md file with revised wordings for
the Breaking Changes, specifically affecting build2005a and build2006a.
Changes in `deleteSelected()`:
- Add a condition to check if `item.fileId` is null or empty
- Avoid calling DriveApp to delete file if item.fileId is not available
- Log a warning message to system log if `item.fileId` is not available

Changes in `getSelected()`:
- Use early exit to skip the current iteration in the for loop if
  `isChecked` is false
- Retrieve row data from the spreadsheet and include them in the `items`
  object

Fixes issue #90
This commit adds a new utility function called `getFileDetails()` in a
new file `utils.js`. This function takes a URL as an argument and
returns an object containing the path, file name, and file extension of
the URL.

For example, `getFileDetails("https://example.com/foo/bar/baz.txt")`
would return `{path: "/foo/bar/", name: "baz", ext: ".txt"}`.

The `fetcher.js` file has been updated to use this function instead
of `String.split()` when fetching data from a URL. This helps resolving
URLs and extracting file information at once.
- Installed [email protected], @babel/[email protected],
  [email protected], [email protected] as development dependencies
- Added a test script in `package.json` to run jest with a custom
  configuration file in `jest.config.js`
- Added a Jest extension setting for VS Code
- Reword the "Set Up Subscriptions" and the "Configuratoin Settings" sections for more appealing and readable
- Add new screenshot images using the picture template
- Enable `amp-youtube` component
- Embed a short demo video by including the YouTube template
- Add CSS styles for .note, .tip, .caution classes
- Removed the unused custom CSS classes
- Removed the instruction for Health Monitoring from the landing page
- Promote the "Advanced Configurations" section from H3 to H2
- Remove "Deploy as a Web API" which may cause confusion to general users
- Reword and style the content for more appealing and reabable
- Rewrite the privacy and security section to make it more clear and concise
- Use styled blockquotes to highlight the important points
- Rewrite the FAQ section to make it more clear and concise
- Re-style the FAQ questions using blockquotes and .note CSS class for better markdown format and more appealing on the rendered page
- Rename from "Get Help" to "Help and Support" section
- Provide more description to encourage user feedbacks and contributions
- Rename from "Release Notes" to "Update and Changes" section
- Provide more description to encourage user to visit the project repository
- Rename from "License" to "License and Terms" section
- Provide more details to make more clear and concise
- Allow adding custom menu to the Google Sheet UI when the file opens via calling the module
- Remove the `ui.js` from the `dist` directory
- Update the notes at the beginning of the readme file
- Add the instructure to guide users how to manual upgrade their exisintg Google Sheet file from V8 to V9
- Update the table of contents
- Simplify the link reference to BBC News's Instagram account
- Rename the section "Release Notes" to " Changelog"
- Add the note for the latest build240205a (Library V9)
- Add screenshot of custom menu
- Style the headers with .note CSS classes
- List the new contributors to the corresponding release notes
- Add a release note for Build2211a (Library V1)
- Delete the notes for all pre-releases
- Reword some release notes to make more clear and concise
- Remove the "HOME" item from the navigation menu
- Add the "Release Notes" and "Advanced Configurations" items to the navigation menu
- Set to display the download button on each page
- Set `/images/instagram-to-drive_730x365_o55.jpg` as the default image for the og:image meta tag
- Replace the useful-links in the sidebar by adding a local template file in the `dosc/_includes/sidebar/custom` directory
- Remove the unused Jekyll plugins from the Gemfile
- Update the gems to the latest available versions
- Update the project version to the latest pre-release version.
- Generate the bundle.js file using the latest source files.
@chriskyfung chriskyfung merged commit 0791a81 into master Feb 5, 2024
2 checks passed
@chriskyfung chriskyfung deleted the dev branch February 5, 2024 14:02
@chriskyfung chriskyfung changed the title v4.3.0 DEV v4.3.0 Feb 6, 2024
@chriskyfung chriskyfung changed the title DEV v4.3.0 DEV for V9 Feb 6, 2024
@chriskyfung chriskyfung changed the title DEV for V9 Development version for v9 Feb 6, 2024
@chriskyfung chriskyfung changed the title Development version for v9 Development version for V9 Feb 6, 2024
@chriskyfung chriskyfung changed the title Development version for V9 🏗 Development version for V9 Feb 6, 2024
@chriskyfung chriskyfung changed the title 🏗 Development version for V9 🏗 Development for V9 Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed javascript Pull requests that update Javascript code
Projects
None yet
1 participant