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: remove spinner + reduce load time + add rowDataMapper - PTL-1517 #2042

Merged
merged 7 commits into from
Dec 6, 2024

Conversation

MrBrunoWolff
Copy link
Collaborator

This will:

  • Add missing :rowDataMapper attribute
  • Fix :request attribute
  • Remove loading + reduce delay... working fine with 500ms, no need for extra "noise"/distraction
  • Small documentation tweaks

Do the changes you have made apply to both Current and Previous versions?
No

Have you done a trial build to check all new or changed links?
Yes

Is there anything else you would like us to know?
No

@MrBrunoWolff MrBrunoWolff self-assigned this Dec 4, 2024
@MrBrunoWolff MrBrunoWolff marked this pull request as ready for review December 4, 2024 23:40
@MrBrunoWolff
Copy link
Collaborator Author

fyi @matteematt

Copy link
Contributor

@matteematt matteematt 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 the work, great improvement of information. Just being a bit nitpicky to ensure that it matches the format of all of the other docs for consistancy

Copy link
Contributor

Choose a reason for hiding this comment

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

This is very useful, thanks. However to be very nitpicky, in every other doc we've created a seperate table for properties just so it's super clear to use the :

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

addressed in a71d87d

<td><code>request</code></td>
<td><code>string</code></td>
<td><code>:request</code></td>
<td><code>any</code></td>
<td>Similar to <code>fields</code> but for <a href="/develop/server-capabilities/snapshot-queries-request-server/">Request Server</a> scenarios. This optional parameter enables you to specify request fields, which can include wildcards.</td>
<td>

```html
Copy link
Contributor

Choose a reason for hiding this comment

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

Now we're adding template strings I think typescript syntax works better

Suggested change
```html
```typescript

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

image

doesn't look good, let's stick with html (I also tried tsx which has the same output BUT in-editor it's all red/mixed with correct.. mdx + tables + code = doesn't work 100% in vscode)

Copy link
Contributor

Choose a reason for hiding this comment

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

Are you certain that this speed is ok? I set it to 2000 because I was testing on 1000 and sometimes it didn't load correctly?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it never failed for me.. @matteematt can you re-check this branch? let me know if it fails

Copy link
Contributor

@matteematt matteematt left a comment

Choose a reason for hiding this comment

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

Looks great after the new changes, just left one comment. Also I tested and 500 seems ok now. Happy to merge that, and can adjust later if feedback recommends

Comment on lines 199 to 209
<grid-pro-client-side-datasource resource-name="DATASERVER_OR_REQUEST_SERVER_NAME" view-number="2">
<grid-pro-server-side-datasource resource-name="DATASERVER_OR_REQUEST_SERVER_NAME" view-number="2">
```
</td>
</tr>
<tr>
<td><code>:rowDataMapper</code></td>
<td><code>Function</code></td>
<td>Function to map the row data before it is sent to the grid. The function should return an array of objects, where each object represents a row in the grid.</td>
<td>
```html
Copy link
Contributor

Choose a reason for hiding this comment

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

You can add that to the properties table you created too

@MrBrunoWolff
Copy link
Collaborator Author

@matteematt should be ok now, had a conflict with a commit from preprod

@jay-taylerson
Copy link
Collaborator

@MrBrunoWolff @matteematt please let us know if this is approval/merge worthy

@jay-taylerson
Copy link
Collaborator

Looks OK to me. The one thing which might be useful, and keen for your thoughts on... but in server for placeholders we generally use a form of brackets to denote.

So instead of resource-name="DATASERVER_OR_REQUEST_SERVER_NAME" it would be resource-name="<DATASERVER_OR_REQUEST_SERVER_NAME>"

I realise <> doesn't work well in client docs, should we use [] ?

resource-name="[DATASERVER_OR_REQUEST_SERVER_NAME]"

@matteematt @MrBrunoWolff

@jay-taylerson
Copy link
Collaborator

Maybe not, happy to be pushed back on this FYI.

@MrBrunoWolff
Copy link
Collaborator Author

MrBrunoWolff commented Dec 6, 2024

@jay-taylerson that sounds interesting and something that got me thinking yesterday, "wildcard scenarios"

I'd leave that for a separate PR, that would scan all the pages in one go, but definitely a "next thing"

@jay-taylerson jay-taylerson merged commit 9e5e5c8 into preprod Dec 6, 2024
@jay-taylerson jay-taylerson deleted the bw/grid-pro-fixes-PTL-1517 branch December 6, 2024 15:59
@matteematt
Copy link
Contributor

Looks OK to me. The one thing which might be useful, and keen for your thoughts on... but in server for placeholders we generally use a form of brackets to denote.

So instead of resource-name="DATASERVER_OR_REQUEST_SERVER_NAME" it would be resource-name="<DATASERVER_OR_REQUEST_SERVER_NAME>"

I realise <> doesn't work well in client docs, should we use [] ?

resource-name="[DATASERVER_OR_REQUEST_SERVER_NAME]"

@matteematt @MrBrunoWolff

Interesting suggstion. I think we've taken a bit of a different approach in our docs. Rather than showing a placeholder value we've tended to show concrete examples. I quite like this as I think it aids understanding for people who are new to the concept. Perhaps there are times where we are being generic though, in that case I think we should add some symbols as suggested to make it clear they're placeholders and you can't copy and paste exactly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants