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

Commit 66f12ba breaks Arcade samples short url in Dashboard Edit data expression dialog #95

Open
1 task done
talllguy opened this issue Oct 29, 2024 · 5 comments
Open
1 task done
Assignees
Labels
bug Something isn't working

Comments

@talllguy
Copy link

talllguy commented Oct 29, 2024

Check existing issues

Markdown file

https://gist.github.com/talllguy/2e4b70d79726f11ead6395fc2bcea6c3

Description

In 66f12ba the repository structure was reorganized and given a nice overhaul 👍 . However, the the refactoring of the dashboard_data folder to just dashboard breaks the short URL that appears in an ArcGIS Online dashboard where the user intends to create a data expression.

Details

https://arcg.is/38SEWWz resolves to https://github.com/Esri/arcade-expressions/tree/master/dashboard_data

Possible resolution

update the short url to point to https://github.com/Esri/arcade-expressions/tree/master/dashboard or to the :octocat: permalink

Screenshot of issue

image

Comments (optional)

No response

@talllguy talllguy added the bug Something isn't working label Oct 29, 2024
@ekenes
Copy link
Contributor

ekenes commented Nov 6, 2024

@hhkaos can you take care of this since you did the reorganization?

@hhkaos hhkaos self-assigned this Nov 7, 2024
@hhkaos
Copy link
Member

hhkaos commented Nov 7, 2024

Sure, but I think this has a challenging resolution:

  • That redirect was created with bit.ly, but I don't know who created it. Even if we knew, only paid accounts can change that, which I guess it is unlikely that we can change that.
  • I couldn't find a way to set redirects on GitHub for missing files (1). I think it is only supported in GitHub Pages
  • I can not find that URL in this repo
  • Using Google, I could find the URL in Esri Community (1, 2) and Stack Exchange (1)
  • It might also be on some web maps and other potential places

I renamed https://github.com/Esri/arcade-expressions/tree/master/dashboard_data was renamed to https://github.com/Esri/arcade-expressions/tree/master/dashboard.

Some "solutions" might be:

  1. Write a message on the three community posts letting the author know that the URL is broken and request to update to the new one
  2. Create that folder again with the following message: (I don't like this one very much)

THIS FOLDER HAS BEEN RENAMED. GO TO: https://github.com/Esri/arcade-expressions/tree/master/dashboard

But this issue has many ramifications; others community posts are pointing to the previous paths (like this one). This means that the two solutions above won't solve everyone's problem. So instead, I propose to create an issue and pin in it with the information of the new files. Something like this:

Issue title: About missing files/expressions (404 - page not found)
Content:

Due to a reorganization of the files in this repo you might have found a "404 - page not found. The master branch of arcade-expressions does not contain the path [FILE/FOLDER NAME]" message.

Please check this comment, it contains the new paths removed files.

Apologies for the inconvenience. Comment on this issue if you can't find a file or folder.

P.S. If you found this on Esri Community and want to help other users, please consider sharing in that thread, warning the author that a link is broken and the URL if you found it.

Note: The only long-term solution I can think of is to use GitHub pages instead. But this would require more thinking.

Thoughts? Other ideas?

@talllguy
Copy link
Author

talllguy commented Nov 7, 2024

I have some thoughts, if you will allow me:

Scenario 1 - no ability to edit bit.ly

In this scenario, a new link is made and propogated.

  1. Whomever controls the bit.ly account at Esri (to make those arcg.is links) can create a new one for the https://github.com/Esri/arcade-expressions/tree/master/dashboard/dashboard_data
  2. The dashboard product team change revise the Arcade template editor sample text to the new URL

These steps would take care of the main ways people are getting to this repository, since it appears by default in every instance of the arcade editor in Dashboard.

Then @hhkaos you or someone on the community side could "Write a message on the three community posts" to close those loops.

Scenario 2 - Esri bit.ly is paid app

In this scenario, someone in Redlands can edit the target of that link. My assumption is that Esri does have a paid/enterprise account because every ArcGIS Online content page has a unique shortlink generator. There has to be hundreds of thousands of those URLs out there for anyone that clicks the share button. Also, if you share a survey in Survey123 by default it makes one of these URLs.
image

  1. Whomever controls the bit.ly account at Esri (to make those arcg.is links) can edit the link (assumes it is technically possible)
  2. No further changes

The :octocat: Pages idea sounds fun but you're right it would be more of an overhaul. You'd have to build the index.html in the root and then link to all the various examples and routes. Personally as an end user I have no difficulty browsing around on the repo.

@talllguy
Copy link
Author

talllguy commented Nov 7, 2024

Whoa, another option for number 1! There is a production url shortener for these links available at https://arcg.is/prod/shorten?longUrl=

So if we take:

https://arcg.is/prod/shorten?longUrl=https://github.com/Esri/arcade-expressions/tree/master/dashboard/dashboard_data&format=html

We get

{"status_code": 200, "status_txt": "OK", "data": { "long_url" : "https://github.com/Esri/arcade-expressions/tree/master/dashboard/dashboard_data", "url": "https://arcg.is/ea141", "hash": "ea141", "global_hash": "ea141", "new_hash": 1 } }

I found this via the community.

@hhkaos
Copy link
Member

hhkaos commented Nov 9, 2024

Thanks Elliot; I think you are right. I thought the owner of the arcg.is domain was bit.ly, but I just double-checked, and it is not.

I'll try to find who inside Esri has access to that and check if it is possible to update the URL.

I'll keep you informed.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants