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: guides overhaul #128

Merged
merged 12 commits into from
Dec 28, 2023
Merged

docs: guides overhaul #128

merged 12 commits into from
Dec 28, 2023

Conversation

morehawes
Copy link
Contributor

This PR is a complete overhaul of the guides/ directory. While trying to wrap my head around the library, I found the existing Guides to be a bit confusing and lacking.

Using the existing Guides as a starting point, I have re-structured and added a lot of new content to make the Guides more useful and easier to navigate. I also paid attention to the style and formatting to make it easier to read and understand, while sticking to the existing style as much as possible.

This is my understanding of the library, which I pieced together from the existing Guides, examples, API Docs and delving into the src/ and development/ source code. Props to TypeScript for helping out with the latter.

I am sure there are some errors and omissions, so feedback welcome and I am happy to make any changes as needed.

Changes

In this new form, the guides/ directory contains the following Markdown pages:

  1. Getting Started
  2. Adapters
  3. Modes
  4. Styling
  5. Events
  6. Development

Restructuring / Navigation

  • All pages in the guides/ directory now have a numeric prefix to control the order in which they appear. The exception is the CODE_OF_CONDUCT.md file, which I have left as-is.
  • At the end of each page there is a list of links to the other pages in the guides/ directory, so it is easy to navigate between them.

1.Getting Started

  • Added additional Key Concepts content:
    • Store
    • Adapters
    • Modes
  • Improved Installation instructions.

2.Adapters

Added sections:

  • Available Adapters
  • Using Adapters
  • Examples:
    • Leaflet
    • MapLibre
    • Google Maps
    • MapBox

3.Modes

Added sections:

  • Mode Names
  • Drawing Modes
  • Selection Mode
  • Render Mode
  • Adding Modes
  • Enabling Modes
  • Loading Features

4.Styling

Added sections:

  • Drawing Modes:
    • Points
    • Lines
    • Polygons
    • Freehand
    • Great Circle
    • Circle
    • Rectangle
  • Selection Mode
    • Points
    • Lines
    • Polygons
    • Selection Points
    • Mid Points
  • Render Mode
    • Points
    • Lines
    • Polygons

5.Events

Restructured sections into:

  • Native Events
  • Terra Draw Events

6.Development

Mostly minor tweaks and improvements.

General / Other

  • Added inline Alerts to highlight important information.
  • Added lang to all code blocks.
  • Lots of minor tweaks to improve formatting and readability.

Removed

  • guides/COMMON_PATTERNS.md - content broken up and moved to other pages.
  • guides/CONTRIBUTING.md - content moved to DEVELOPMENT.md#contributing.

The README.md file in the root directory, as well as the docs/index.html has been updated to reflect these Guide location changes.

This PR is a complete overhaul of the `guides/` directory. While trying to wrap my head around the library, I found the existing Guides to be a bit confusing and lacking.

Using the existing Guides as a starting point, I have re-structured and added a lot of new content to make the Guides more useful and easier to navigate. I also paid attention to the style and formatting to make it easier to read and understand, while sticking to the existing style as much as possible.

This is _my_ understanding of the library, which I pieced together from the existing Guides, examples, API Docs and delving into the `src/` and `development/` source code. Props to TypeScript for helping out with the latter.

I am sure there are some errors and omissions, so feedback welcome and I am happy to make any changes as needed.

## Changes

In this new form, the `guides/` directory contains the following Markdown pages:

1. Getting Started
2. Adapters
3. Modes
4. Styling
5. Events
6. Development

### Restructuring / Navigation

- All pages in the `guides/` directory now have a numeric prefix to control the order in which they appear. The exception is the `CODE_OF_CONDUCT.md` file, which I have left as-is.
- At the end of each page there is a list of links to the other pages in the `guides/` directory, so it is easy to navigate between them.

### 1.Getting Started

- Added additional Key Concepts content:
  - Store
  - Adapters
  - Modes
- Improved Installation instructions.

### 2.Adapters

Added sections:

- Available Adapters
- Using Adapters
- Examples:
  - Leaflet
  - MapLibre
  - Google Maps
  - MapBox

### 3.Modes

Added sections:

- Mode Names
- Drawing Modes
- Selection Mode
- Render Mode
- Adding Modes
- Enabling Modes
- Loading Features

### 4.Styling

Added sections:

- Drawing Modes:
  - Points
  - Lines
  - Polygons
  - Freehand
  - Great Circle
  - Circle
  - Rectangle
- Selection Mode
  - Points
  - Lines
  - Polygons
  - Selection Points
  - Mid Points
- Render Mode
  - Points
  - Lines
  - Polygons

### 5.Events

Restructured sections into:

- Native Events
- Terra Draw Events

### 6.Development

Mostly minor tweaks and improvements.

### General / Other

- Added inline Alerts to highlight important information.
- Added lang to all code blocks.
- Lots of minor tweaks to improve formatting and readability.

### Removed

- `guides/COMMON_PATTERNS.md` - content broken up and moved to other pages.
- `guides/CONTRIBUTING.md` - content moved to `DEVELOPMENT.md#contributing`.

The README.md file in the root directory, as well as the `docs/index.html` has been updated to reflect these Guide location changes.
@JamesLMilner
Copy link
Owner

@morehawes thanks for this, appreciate your hard work here. I'm just away for the weekend but will get to looking at this next week with some thoughts!

@JamesLMilner
Copy link
Owner

Hey @morehawes I've not forgotten about this just been really busy in the run up to Christmas with work. I just think the docs are really important and want to get them right! I'll get to this soon over the holidays 👍🏻 Thanks again for your input!

@morehawes
Copy link
Contributor Author

@JamesLMilner, Sounds good, enjoy the holidays :)

Copy link
Owner

@JamesLMilner JamesLMilner left a comment

Choose a reason for hiding this comment

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

Thanks for taking the time to go through this. I appreciate the hard work! I added a few comments but generally this approach will be much easier to follow!

guides/4.STYLING.md Show resolved Hide resolved
guides/1.GETTING_STARTED.md Show resolved Hide resolved
guides/6.DEVELOPMENT.md Outdated Show resolved Hide resolved
guides/4.STYLING.md Outdated Show resolved Hide resolved
@morehawes
Copy link
Contributor Author

Thanks for taking the time to go through this. I appreciate the hard work! I added a few comments but generally this approach will be much easier to follow!

You're welcome and I have made the changes you suggested :)

@JamesLMilner
Copy link
Owner

Thanks @morehawes, appreciate your hard work on this. Hopefully people find this easier to follow now!

@JamesLMilner JamesLMilner merged commit 6eb26c3 into JamesLMilner:main Dec 28, 2023
4 checks passed
@morehawes morehawes deleted the pr-6 branch December 28, 2023 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants