Skip to content

Commit 39ce052

Browse files
authored
Merge pull request #41 from TomPlum/develop
- Git Index Status Prop - Rolled back Renovate PR that broke build
2 parents 96a81e2 + 8625bcc commit 39ce052

24 files changed

Lines changed: 774 additions & 591 deletions

README.md

Lines changed: 34 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -196,34 +196,36 @@ All components have optional props to further configure the log.
196196
197197
### GitLog
198198
199-
| Property | Type | Description |
200-
|-------------------------------|-----------------------------|----------------------------------------------------------------------------------------------------------|
201-
| `theme` | `ThemeMode` | The variant of the default color theme to apply to the log. |
202-
| `colours` | `ThemeColours \| string[]` | Array of colors used for graph elements. One per column, looping if insufficient colors are provided. |
203-
| `showHeaders` | `boolean` | Whether to show element names like "Graph" or "Commit message" at the top of the component. |
204-
| `rowSpacing` | `number` | The spacing between log rows, affecting branches, graph, and table. Default: `0`. |
205-
| `githubRepositoryUrl` | `string` | URL of the GitHub repository where `entries` came from. Enables links for commits, tags, and PRs. |
206-
| `defaultGraphWidth` | `number` | Default width of the graph in pixels. Can be changed dynamically if resizing is enabled. Default: `300`. |
207-
| `onSelectCommit` | `(commit?: Commit) => void` | Callback function when a commit is selected. `commit` is `undefined` if unselected. |
208-
| `classes` | `GitLogStylingProps` | CSS classes for various elements to enable custom styling. |
209-
| `paging` | `GitLogPaging` | Optional paging settings for displaying a subset of log entries. |
199+
| Property | Type | Description |
200+
|-----------------------|-----------------------------|----------------------------------------------------------------------------------------------------------|
201+
| `theme` | `ThemeMode` | The variant of the default color theme to apply to the log. |
202+
| `colours` | `ThemeColours \| string[]` | Array of colors used for graph elements. One per column, looping if insufficient colors are provided. |
203+
| `showHeaders` | `boolean` | Whether to show element names like "Graph" or "Commit message" at the top of the component. |
204+
| `rowSpacing` | `number` | The spacing between log rows, affecting branches, graph, and table. Default: `0`. |
205+
| `githubRepositoryUrl` | `string` | URL of the GitHub repository where `entries` came from. Enables links for commits, tags, and PRs. |
206+
| `defaultGraphWidth` | `number` | Default width of the graph in pixels. Can be changed dynamically if resizing is enabled. Default: `300`. |
207+
| `onSelectCommit` | `(commit?: Commit) => void` | Callback function when a commit is selected. `commit` is `undefined` if unselected. |
208+
| `classes` | `GitLogStylingProps` | CSS classes for various elements to enable custom styling. |
209+
| `paging` | `GitLogPaging` | Optional paging settings for displaying a subset of log entries. |
210+
| `indexStatus` | `GitLogIndexStatus` | Renders information about added, deleted and modified files to the index pseudo-commit entry. |
210211
211212
212213
### GitLogPaged
213214
214-
| Property | Type | Description |
215-
|-------------------------------|-----------------------------|----------------------------------------------------------------------------------------------------------|
216-
| `theme` | `ThemeMode` | The variant of the default color theme to apply to the log. |
217-
| `colours` | `ThemeColours \| string[]` | Array of colors used for graph elements. One per column, looping if insufficient colors are provided. |
218-
| `showHeaders` | `boolean` | Whether to show element names like "Graph" or "Commit message" at the top of the component. |
219-
| `rowSpacing` | `number` | The spacing between log rows, affecting branches, graph, and table. Default: `0`. |
220-
| `githubRepositoryUrl` | `string` | URL of the GitHub repository where `entries` came from. Enables links for commits, tags, and PRs. |
221-
| `defaultGraphWidth` | `number` | Default width of the graph in pixels. Can be changed dynamically if resizing is enabled. Default: `300`. |
222-
| `onSelectCommit` | `(commit?: Commit) => void` | Callback function when a commit is selected. `commit` is `undefined` if unselected. |
223-
| `classes` | `GitLogStylingProps` | CSS classes for various elements to enable custom styling. |
215+
| Property | Type | Description |
216+
|-----------------------|-----------------------------|----------------------------------------------------------------------------------------------------------|
217+
| `theme` | `ThemeMode` | The variant of the default color theme to apply to the log. |
218+
| `colours` | `ThemeColours \| string[]` | Array of colors used for graph elements. One per column, looping if insufficient colors are provided. |
219+
| `showHeaders` | `boolean` | Whether to show element names like "Graph" or "Commit message" at the top of the component. |
220+
| `rowSpacing` | `number` | The spacing between log rows, affecting branches, graph, and table. Default: `0`. |
221+
| `githubRepositoryUrl` | `string` | URL of the GitHub repository where `entries` came from. Enables links for commits, tags, and PRs. |
222+
| `defaultGraphWidth` | `number` | Default width of the graph in pixels. Can be changed dynamically if resizing is enabled. Default: `300`. |
223+
| `onSelectCommit` | `(commit?: Commit) => void` | Callback function when a commit is selected. `commit` is `undefined` if unselected. |
224+
| `classes` | `GitLogStylingProps` | CSS classes for various elements to enable custom styling. |
225+
| `indexStatus` | `GitLogIndexStatus` | Renders information about added, deleted and modified files to the index pseudo-commit entry. |
224226
225227
226-
#### **GitLogStylingProps**
228+
#### GitLogStylingProps
227229
| Property | Type | Description |
228230
|-------------------|-----------------|--------------------------------------------------------------------------------|
229231
| `containerClass` | `string` | Class name for the wrapping `<div>` containing branches, graph, and log table. |
@@ -236,6 +238,14 @@ All components have optional props to further configure the log.
236238
| `size` | `number` | The number of rows to show per page. |
237239
| `page` | `number` | The page number to display (first page is `0`). |
238240
241+
#### GitLogIndexStatus
242+
243+
| Prop | Type | Description |
244+
|------------|----------|---------------------------------------------------------------------------|
245+
| `added` | `number` | The number of added files in the git index for the checked-out branch. |
246+
| `deleted` | `number` | The number of deleted files in the git index for the checked-out branch. |
247+
| `modified` | `number` | The number of modified files in the git index for the checked-out branch. |
248+
239249
### Graph
240250
241251
| Property | Type | Description |
@@ -309,16 +319,14 @@ All components have optional props to further configure the log.
309319
- Can Zustand help us here to reduce re-renders with GitContext Provider?
310320
- Expose component override props for things like CommitNode, CommitMessage etc.
311321
- Straight line prop to turn curves into right angles?
312-
- Node size parameter to make the graph even more compact as it will reduce the minimum column width
313322
- Line curve radius prop?
314323
- Fix React docgen in Storybook controls as its not showing the JSDoc from the interface props
315324
- Extract ThemeContext
316325
- Mobile responsiveness for the demo site
317326
- Add graph render strategy with a second option to use 2d rendering context (html canvas)
318-
- Graph direction? Right now its renders left-right, but do want to invert it in the y-axis?
319327
- Add eslint to pipeline
320-
- Update the WIP comment in the index pseudo commit to show files added/edited etc.
321328
- Add in prop to show-hide the index pseudo commit
322329
- Tags should be independent. Add a new optional field to the log entry / commit objects.
323330
- Branch / Tags column is fixed. Dynamically floor it to match the max tag size currently being rendered?
324-
- Is the SS paginated log gonna accept data from multiple branches? Because then we need the HEAD commits of each branch
331+
- Is the SS paginated log gonna accept data from multiple branches? Because then we need the HEAD commits of each branch
332+
- Make repository URL a function that generates the URL

0 commit comments

Comments
 (0)