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

docs: minor improvements and fixes #1022

Merged
merged 6 commits into from
Jul 19, 2022
Merged

Conversation

saragerion
Copy link
Contributor

@saragerion saragerion commented Jul 19, 2022

Description of your changes

Follow-up PR from #1021.

Changes introduced:

  • Fixed formatting issues in README files (Intro & roadmap sections) introduced in docs: minor improvements #1021
  • Installed lightbox plugin in docs to allow smooth UX when zooming in and scrolling through images
  • Added images in Logger, Tracer and Metrics to showcase outputs in CloudWatch + alt
  • Fixed Markdown tables formatting
  • Changed order of examples to: Middy, Decorator, Manual instrumentation
  • Added license link
  • Added Contributing + Roadmap CTAs in docs homepage

How to verify this change

Docs: npm run docs-website-build-run

Related issues, RFCs

N/A

PR status

Is this ready for review?: YES
Is it a breaking change?: NO

Checklist

  • My changes meet the tenets criteria
  • I have performed a self-review of my own code
  • I have commented my code where necessary, particularly in areas that should be flagged with a TODO, or hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding changes to the examples
  • My changes generate no new warnings
  • The code coverage hasn't decreased
  • I have added tests that prove my change is effective and works
  • New and existing unit tests pass locally and in Github Actions
  • Any dependent changes have been merged and published in downstream module
  • The PR title follows the conventional commit semantics

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Jul 19, 2022
@saragerion saragerion self-assigned this Jul 19, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Jul 19, 2022

📊 Package size report   -0.03%↓

File Before After
aws-lambda-powertools-logger-1.0.1.tgz 24.3 kB -0.03%↓24.3 kB
aws-lambda-powertools-metrics-1.0.1.tgz 17.7 kB -0.01%↓17.7 kB
aws-lambda-powertools-tracer-1.0.1.tgz 21.6 kB -0%↓21.6 kB
logger-bundle.zip 24.8 kB -0.06%↓24.8 kB
metrics-bundle.zip 18.2 kB 0.2%↑18.3 kB
tracer-bundle.zip 22.2 kB -0.2%↓22.1 kB
Total (Includes all files) 142.0 kB -0.03%↓142.0 kB
Tarball size 140.9 kB -0.02%↓140.8 kB
Unchanged files
File Size
aws-lambda-powertools-commons-1.0.1.tgz 6.3 kB
commons-bundle.zip 6.8 kB

🤖 This report was automatically generated by pkg-size-action
(options hash: 22cc03f98254c538191095162d7c6186)

@github-actions
Copy link
Contributor

github-actions bot commented Jul 19, 2022

📊 Package size report   -0.03%↓

File Before After
aws-lambda-powertools-logger-1.0.1.tgz 24.3 kB -0.03%↓24.3 kB
aws-lambda-powertools-metrics-1.0.1.tgz 17.7 kB -0.01%↓17.7 kB
aws-lambda-powertools-tracer-1.0.1.tgz 21.6 kB -0%↓21.6 kB
logger-bundle.zip 24.8 kB -0.06%↓24.8 kB
metrics-bundle.zip 18.2 kB 0.2%↑18.3 kB
tracer-bundle.zip 22.2 kB -0.2%↓22.1 kB
Total (Includes all files) 142.0 kB -0.03%↓142.0 kB
Tarball size 140.9 kB -0.03%↓140.9 kB
Unchanged files
File Size
aws-lambda-powertools-commons-1.0.1.tgz 6.3 kB
commons-bundle.zip 6.8 kB

🤖 This report was automatically generated by pkg-size-action
(options hash: 50054c3c7c27d6bd19808267854de7f2)

flochaz
flochaz previously approved these changes Jul 19, 2022
Copy link
Contributor

@flochaz flochaz left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Contributor

@dreamorosi dreamorosi left a comment

Choose a reason for hiding this comment

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

Left a few comments (mostly fairly minor) around:

  • management of the new plugin dependency (not being used in the CI/CD build)
  • accessibility (add alt attribute to images)

The only mild issue from my side is that at least on mobile this specific lightbox seems to make things worse. What I mean by that is that mobile users can simply pan & zoom natively and the result is actually better (see video below):

RPReplay_Final1658224864.mp4

In the first half I just pan & zoom with my finger and I am able to see the image at full-res while instead when I open the lightbox (which I still need to zoom) I am shown a thumbnail that has low res.

Looking at the settings of this plugin there seems not to be a straightforward way to disable it on mobile only.

@@ -1,2 +1,2 @@
FROM squidfunk/mkdocs-material
RUN pip install mkdocs-git-revision-date-plugin
RUN pip install mkdocs-git-revision-date-plugin mkdocs-glightbox
Copy link
Contributor

Choose a reason for hiding this comment

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

What about doing RUN pip install -r requirements.txt and add the dependencies there?

During the documentation build & publish process we actually read that file, so adding it only here means we'll have the new dependency only during development.

If we centralize everything in the requirements.txt file we can pin the version as well as avoiding this kind of oversight again.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree with you!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So we install utilities in 2 ways:

  • Local env: via docker, and the squidfunk/mkdocs-material image already contains some dependencies
  • Github Actions: via pip commands, installing dependencies one by one in the containers of the CI/CD pipeline

So in this case it would not make sense to reuse the same requirements.txt file as some of them would be redundant.

<br />

<figure>
<img src="../../media/logger_utility_showcase.png" loading="lazy" />
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we also add a alt attribute to each image?

The alt attribute holds a text description of the image, which isn't mandatory but is incredibly useful for accessibility — screen readers read this description out to their users so they know what the image means. Alt text is also displayed on the page if the image can't be loaded for some reason: for example, network errors, content blocking, or linkrot.

source

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes! Absolutely. Well spotted.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let me know if they look good enough!

mkdocs.yml Outdated
Comment on lines 81 to 82
effect: zoom
width: 100%
Copy link
Contributor

Choose a reason for hiding this comment

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

minor: this might be redundant. According to the docs these are all default values. If this was a conscious decision in order to explicitly show the settings then you can ignore this comment.

@saragerion saragerion removed their assignment Jul 19, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Jul 19, 2022

📊 Package size report   -0.03%↓

File Before After
aws-lambda-powertools-logger-1.0.1.tgz 24.3 kB -0.03%↓24.3 kB
aws-lambda-powertools-metrics-1.0.1.tgz 17.7 kB -0.01%↓17.7 kB
aws-lambda-powertools-tracer-1.0.1.tgz 21.6 kB -0%↓21.6 kB
logger-bundle.zip 24.8 kB -0.06%↓24.8 kB
metrics-bundle.zip 18.2 kB 0.2%↑18.3 kB
tracer-bundle.zip 22.2 kB -0.2%↓22.1 kB
Total (Includes all files) 142.0 kB -0.03%↓142.0 kB
Tarball size 140.9 kB -0.03%↓140.9 kB
Unchanged files
File Size
aws-lambda-powertools-commons-1.0.1.tgz 6.3 kB
commons-bundle.zip 6.8 kB

🤖 This report was automatically generated by pkg-size-action
(options hash: 99f982174ee6b577795c9800d7718fb7)

@saragerion saragerion merged commit 8f45be8 into main Jul 19, 2022
@saragerion saragerion deleted the docs/minor-improvements-fixes branch July 19, 2022 14:04
dreamorosi pushed a commit that referenced this pull request Aug 2, 2022
* docs: fix formatting issues in readme

* docs: formatting fixes and improvements

* docs: metrics image caption fix

* docs: readme/index bottom sections fixes

* docs: changed order credits

* docs: added CI/CD pip requirments + alt for images
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants