OpenLiberty / guide-rest-client-reactjs

A guide on how to access a simple RESTful web service and consume its resources with ReactJS in Open Liberty.
https://openliberty.io/guides/rest-client-reactjs.html
Other
1 stars 1 forks source link

Hotspot tag issue #37

Closed gkwan-ibm closed 2 years ago

gkwan-ibm commented 3 years ago

@DannyS03 commented on Thu Jun 25 2020

For the draft-guide-rest-client-reactjs, the data and columns hotspots were not highlighting when using tags in the README.adoc: [hotspot=prop-posts file=1]data & [hotspot=prop-columns file=1]columns

The [hotspot=return-table file=1]`return` statement returns the paginated table where you have defined the properties for the [hotspot=table file=1]`ReactTable`. The [hotspot=110 file=1]`data` property corresponds to the consumed data from the API endpoint and is assigned to the `data` of the table. The [hotspot=113 file=1]`columns` property corresponds to the rendered column object and is assigned to the `columns` of the table.
image

They should be highlighting the data={posts} & columns={columns} lines, respectively.

Perhaps it is something to do with the hotspots in ArtistTable.js being declared inside the <ReactTable> JavaScript syntax. Using line numbers for now.

  // tag::return-table[]
  return (
    <div>
      <h2>Artist Web Service</h2>
      {!isLoading ? (
        // tag::table[]
        <ReactTable
          // tag::prop-posts[]
          data={posts}
          // end::prop-posts[]
          // tag::prop-columns[]
          columns={columns}
          // end::prop-columns[]
          defaultPageSize={4}
          pageSizeOptions={[4, 5, 6]}
        />) : (
        // end::table[]
          <p>Loading .....</p>
        )}
    </div>
    );
    // end::return-table[]

@yeekangc commented on Wed Nov 25 2020

Is this an issue for the guides themselves or for openliberty.io?

If this is for the React guide alone, we shouldn't have it under guides-common?

@gkwan-ibm, can you please review and handle?

gkwan-ibm commented 2 years ago

close