Azure / api-management-developer-portal

Developer portal provided by the Azure API Management service.
MIT License
488 stars 318 forks source link

Show first Operation when opening API details pages #863

Closed ZarTrox closed 4 years ago

ZarTrox commented 4 years ago

Bug description

When navigating to an API the first thing a user will see is an "empty" page with no operations selected. It would be best if the Portal defaults to showing the first Operation of this API.

Reproduction steps

  1. Go to the API details page of an API
  2. See that the page doesn't contain content

Expected behavior

When navigating to the API details page of an API show the first Operation of this API.

Is your portal managed or self-hosted?

Managed

ilspiert commented 4 years ago

Can confirm that - I've seen that on my managed Developer Portal as well. The last publish was on 1.9.2020.

azaslonov commented 4 years ago

Hi @ZarTrox/@fsettele, do you guys have this option checked here?

image

AnRei123 commented 4 years ago

I just retested the whole thing the following:

  1. Open portal in edit mode.
  2. Open API page and select and API
  3. API details (including API operation details) page opens. First API operation in the list of operation is not selected by default and no details of any operation are displayed by default.
  4. Went to the settings of the "list of operations" and enabled the "Allow selection" checkbox
  5. In the modification mode, went to the home page and back to the API (incl. operations) details page.
  6. In the modification mode, the first operation was highlighted and the operation details had been displayed now.
  7. Published the portal and opened the API (operation details) page in the reading mode.
  8. No operation in the list of operations was preselected and no content of any operation was displayed in the operation details widget by default.
  9. Went back to modification mode and opened the settings for the "List of operations". My changes were not reflected anymore. !!!!The checkbox "Allow selection" was disabled again!!! My changes had been automatically rolled back from the system - even after saving the portal! Selecting it again and publishing again looped the experience, but did not fix the issue!
ilspiert commented 4 years ago

In my Developer Portal it does work now - with the "Allow selection" enabled. It seams there was a change in the Managed version since Monday. But know the publish command from the Developer Portal Admin mode ist shaky... To have a successfull publish I have to use the button in the Azure Portal.

AnRei123 commented 4 years ago

Thanks for the hint. I retested the behavior for the publish button in the APIM portal GUI, but for my APIM service it does not make any difference which "publish" button I use. I experienced for both publish buttons (on APIM portal page and in the Edit DevPortal mode) the same buggy behavior.

AnRei123 commented 4 years ago

My list of operation widget is placed on the layout page and the widget for the operation details is placed on the API details page. In editing mode, everything seems to be fine now. And the settings are not reverted after publishing. But in the reading mode, the first item in the list of operations is highlighted, but the related operation details are not displayed as in the editing view for this page. I created some screenshots to visualize this behaviour and my setttings.

ygrik commented 4 years ago

I just retested the whole thing the following:

  1. Open portal in edit mode.
  2. Open API page and select and API
  3. API details (including API operation details) page opens. First API operation in the list of operation is not selected by default and no details of any operation are displayed by default.
  4. Went to the settings of the "list of operations" and enabled the "Allow selection" checkbox
  5. In the modification mode, went to the home page and back to the API (incl. operations) details page.
  6. In the modification mode, the first operation was highlighted and the operation details had been displayed now.
  7. Published the portal and opened the API (operation details) page in the reading mode.
  8. No operation in the list of operations was preselected and no content of any operation was displayed in the operation details widget by default.
  9. Went back to modification mode and opened the settings for the "List of operations". My changes were not reflected anymore. !!!!The checkbox "Allow selection" was disabled again!!! My changes had been automatically rolled back from the system - even after saving the portal! Selecting it again and publishing again looped the experience, but did not fix the issue!

Hi @AnRei123 Did you save changes after step 4 and before step 7? You can do it with hotkeys Ctrl + S or use the button in the left bottom corner

ZarTrox commented 4 years ago

I cannot speak for @AnRei123 if she did save but in our environments the settings are now corrected and set. As expected in most tests the APIdetails page immediately showed the first operation. But in the same environment with the same templates a few didn't show them. When going back and navigating again to the API it worked. So there seems to be some kind of inconsistency.

AnRei123 commented 4 years ago

Yes, I saved it frequently nearly after each step earlier with the button but newer days with Ctrl.+S.

AnRei123 commented 4 years ago

If you merged the commit for this fix to the master does this mean that the fix has been already rolled out? When do you plan to roll out the solution? The error still occurs even after publishing the DevPortal content again. Sometimes it works when freshly open the API gallery. But most of the time it does not work when switching between product details and between several apis.