Closed abettermap closed 3 years ago
@rperlin-ela i already knocked this out in a few hours this evening before i wrote the issue. working fabulously, even rich text, just be sure use relative links like i have in the table descrip. and if you need more, just holler. i componentized the carp out of it to work for either rich text or lack thereof, and can basically add a new instance of it in a couple minutes. worth the few hours of work for sure!
Question— what do you mean by “relative links like i have in the table descrip”? I remember the deal with relative links in WP (Help), but I was actually wondering how if/how to implement relative links in Airtable, let’s say I want to link from a bit of text in one Descrip to another record. Sorry if I missed a beat
On Mar 28, 2021, at 12:26 AM, Jason Lampel @.***> wrote:
@rperlin-ela https://github.com/rperlin-ela i already knocked this out in a few hours this evening before i wrote the issue. working fabulously, even rich text, just be sure use relative links like i have in the table descrip. and if you need more, just holler. i componentized the carp out of it to work for either rich text or lack thereof, and can basically add a new instance of it in a couple minutes. worth the few hours of work for sure!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Language-Mapping/language-map/issues/214#issuecomment-808842533, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMNKB5H7LDUA27LRGTYA4Q3TF2VYJANCNFSM4Z5T5CGA.
Sorry, I meant AT column descriptions, not just table descriptions.
Refresher: Airtable > UI Text table, hover over the little ℹ️ button on the right hand side of any column to see the description for that column. I've documented the table and each of the columns that way.
Confusing that it's called a column "description" given all of our description stuff, but that's just their terminology.
Re: relative path, it's everything from the 1st slash after the domain until the end of the URL.
would have a relative path of
/about/bio
It's really silly that Airtable doesn't just leave the URL intact, seems like a common use case and at least one person has complained about it in the forums.
To see what the relative path is for something you are trying to link to, it's probably easiest to go to that link first, then just copy and paste the piece of the URL you need into Airtable. Example:
https://languagemap.nyc/Explore/Neighborhood/Sunnyside%20(Queens)
You'd need:
/Explore/Neighborhood/Sunnyside%20(Queens)
FYI the %20 (and similarly strange looking patterns), those are just URL encodings for spaces and special characters. You can leave the %20 intact and if it doesn't work then just replace it with a space. 
As for a WordPress relative paths, you can do the same and it will technically work, but just know that it will trigger a full page reload and the state of the application such as the symbology or filters you had selected, will be reset. Hard to explain but the reason I am able to bypass this issue when using Airtable is that I convert the markdown it generates on the fly. Whereas WordPress is sending back HTML, and I can't manipulate that the same way.
there's more to it than that and it has to do with routing, but it's been that way since the beginning and it's not something I would fix in this scope. Long term hopefully we will have a better approach, but for now just try to use links sparingly in the WP content, or keep doing it by all means, just know about the page reload thing.
We could technically move your content over to Airtable, but I don't think it supports images inside of Rich text fields. I'll double check but I think that's the case.
Confirmed that Airtable does not support images inside of Rich tax. One more bummer on top of the AT bummer pile.
However, I think I have a hack that could work: instead of using an image tag or whatever the thing is WordPress uses to create images, use an inline code
 with the image source URL as its contents.
Might need a Zoom for that since I can't see what it looks like, but basically I can transform that code element into something useful on the fly.
I'm not sure if there's any other stuff we would lose by moving away from WordPress, if anything it would be nice to have one less platform, and it would open up the doors to break out your content a little more and eventually have nested Info routes instead of the # approach. 
It would take a little time on your end of course to move the stuff over, and probably would not translate with a simple copy and paste, but let me know if you're interested and we can at least discuss what that migration would look like.
Thanks for looking into it — yeah, I’d put anything with WP on the backburner since it's doing its thing and I don’t think there are too many links to begin there at least now.
What I’m really trying to get right is relative linking in AT, and I think I’m still confused, or we’re talking about different things.
I understand it conceptually just fine, but I don’t get how to implement. AT > Descriptions > Armenian (Eastern) is an example. In that text I want to link to Western Armenian. Now tell me what you think, maybe this isn’t a good idea because there are already a bunch of other ways for a user to find it, but I figure it’s in the text, it’s super-related, give ‘em a quick link to the Lg Profile page for Western. I try to add a relative link and it doesn’t work. As you say in one of your column descriptions, AT adds http:// automatically. Sorry if I’m missing something that’s dead easy
On Mar 28, 2021, at 12:19 PM, Jason Lampel @.***> wrote:
Confirmed that Airtable does not support images inside of Rich tax. One more bummer on top of the AT bummer pile.
However, I think I have a hack that could work: instead of using an image tag or whatever the thing is WordPress uses to create images, use an inline code with the image source URL as its contents.
Might need a Zoom for that since I can't see what it looks like, but basically I can transform that code element into something useful on the fly.
I'm not sure if there's any other stuff we would lose by moving away from WordPress, if anything it would be nice to have one less platform, and it would open up the doors to break out your content a little more and eventually have nested Info routes instead of the # approach. 
It would take a little time on your end of course to move the stuff over, and probably would not translate with a simple copy and paste, but let me know if you're interested and we can at least discuss what that migration would look like.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Language-Mapping/language-map/issues/214#issuecomment-808919148, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMNKB5FNMYEUPSERMOZKZTTTF5JHJANCNFSM4Z5T5CGA.
Oh shoot, sorry man, I forgot that I haven't set up the link transformation in any of the previous Rich text Description stuff yet, only the new pieces I added last night!
But no, that is an excellent idea what you are trying to do. I'll see if I can squeeze that in this afternoon and give you something to play with. I'm pretty sure you're doing it right, I just need to adapt my component and apply it to description stuff.
Is there anywhere else in the app besides the bits I made last night and description stuff where we would need rich text with relative links like that? I'm thinking it's only that stuff but let me know if not. Oh actually you might want it for explore/something intros, or can we just cross that bridge when we come to it? I'm not sure it would be as applicable in those spots anyway, since it's at the top of a view that is already encouraging you to scroll to the stuff below, unlike details' descriptions being relatively standalone with lots of text, which makes more sense to have some cross-panel linkage like you're trying to do.
Unless you feel strongly otherwise, let's not support Rich text in explore/something intros. Cool?
Sure, I think it’s really about the various Descrips (sorry there are now three tables of them, still pondering how to streamline). I kind of did my thing already on the Explore intros as you can hopefully see, agree those shouldn't need any linking
On Mar 28, 2021, at 1:10 PM, Jason Lampel @.***> wrote:
Oh shoot, sorry man, I forgot that I haven't set up the link transformation in any of the previous Rich text Description stuff yet, only the new pieces I added last night!
But no, that is an excellent idea what you are trying to do. I'll see if I can squeeze that in this afternoon and give you something to play with. I'm pretty sure you're doing it right, I just need to adapt my component and apply it to description stuff.
Is there anywhere else in the app besides the bits I made last night and description stuff where we would need rich text with relative links like that? I'm thinking it's only that stuff but let me know if not. Oh actually you might want it for explore/something intros, or can we just cross that bridge when we come to it? I'm not sure it would be as applicable in those spots anyway, since it's at the top of a view that is already encouraging you to scroll to the stuff below, unlike details' descriptions being relatively standalone with lots of text, which makes more sense to have some cross-panel linkage like you're trying to do.
Unless you feel strongly otherwise, let's not support Rich text in explore/something intros. Cool?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Language-Mapping/language-map/issues/214#issuecomment-808926134, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMNKB5BWVDJMA4Y45LC7Z4DTF5PHTANCNFSM4Z5T5CGA.
Sounds good. I'll get you something this afternoon along with truncating the card footers. I also have not documented the week three stuff yet, that's going to take some time and we will have some discussions on pop-up stuff for starters.
i may not have explained it very well, and technically the way you did the /Language/Western Armenian/
link IS semi-relative to where you were linking from, but it should be relative to the root of all the things. like i suggested, probably best to go to the actual place you want to link to first, then just copy its URL:
To see what the relative path is for something you are trying to link to, it's probably easiest to go to that link first, then just copy and paste the piece of the URL you need into Airtable. Example:
https://languagemap.nyc/Explore/Neighborhood/Sunnyside%20(Queens)
You'd need:
/Explore/Neighborhood/Sunnyside%20(Queens)
so, in the case of linking to Western Armenian, you would first go there in the UI however way you want, and you can guarantee that you will have the URL you need, which is:
https://languagemap.nyc/Explore/Language/Western%20Armenian
you only need the stuff after "nyc", so /Explore/Language/Western%20Armenian
sorry if it's not clear, i'm not sure how else to explain it though. it's everything after the "nyc" i guess you could say? however makes sense for you to phrase/understand it, up to you.
also i noticed you had a trailing slash at the end of your link. again, going to the URL first and simply copying the part that you need will eliminate the potential for incorrect things like that.
not sure if it helps or hurts but i think these are all the valid routes in the application (more will likely be added for census and counties as we go):
/
/Census
/Explore
/Explore/:field
/Explore/:field/:value
/Explore/:field/:value/:language
/Info
/Info/About
/Info/Feedback
/Info/Help
/table
/table/:id
note that the :
before a piece of each route is just a wildcard. hopefully the depth makes sense though.
anyhoo i got that wired up, but do you also need hyperlink support in the "Read more" intros? i'm guessing no but just checking...
I haven't pushed that yet, as soon as you let me know about the hyperlink support for read more intro sections, I'll either wire that up or push what I have, then get started on neighborhoods
Got it now, thanks, definitely wasn’t being rigorous with my syntax, go ahead and push it whenever (and the truncated cards)
On the subject of routes, Mark was asking whether the old https://languagemap.nyc/help https://languagemap.nyc/help could be redirected to the new https://languagemap.nyc/info/help https://languagemap.nyc/info/help. Where with all our bits and bobs would something like that be accomplished?
On Mar 29, 2021, at 8:59 AM, Jason Lampel @.***> wrote:
I haven't pushed that yet, as soon as you let me know about the hyperlink support for read more intro sections, I'll either wire that up or push what I have, then get started on neighborhoods
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Language-Mapping/language-map/issues/214#issuecomment-809356749, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMNKB5ACX4VCQ44PF562YUTTGB2ULANCNFSM4Z5T5CGA.
pushed: https://github.com/Language-Mapping/language-map/pull/216
Re: routes, maybe. what is the reason? is there some documentation or something hard to change manually? i knew we'd have some route changes but didn't think there would be many external refs to it.
Not a big deal, I think, unless there’s a quick answer (maybe useful in other cases too).
Deploy looks good— but any idea why the famous link from Eastern Armenian to Western Armenian goes instead to Eastern Armenian (Lg Profile)?
On Mar 29, 2021, at 10:11 AM, Jason Lampel @.***> wrote:
pushed: #216 https://github.com/Language-Mapping/language-map/pull/216 Re: routes, maybe. what is the reason? is there some documentation or something hard to change manually? i knew we'd have some route changes but didn't think there would be many external refs to it.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Language-Mapping/language-map/issues/214#issuecomment-809408804, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMNKB5DIETH6VKUDGBW5HQTTGCDAXANCNFSM4Z5T5CGA.
i'm not sure how you're entering these man, but it works for me. i just did a test link by pasting /Explore/Language/Western%20Armenian
exactly like that into Apache's Description and it works fine: https://deploy-preview-216--languagemapping.netlify.app/Explore/Language/Chiricahua%20Apache/28
code is good, merging.
most recent straw was pretty light, but one on top of many on this dev-camel's back, so this is what we're doing and should've done 6 months ago...
use the table i created as the basis of all UI written content that doesn't fit into one of these:
the instructions etc. are in the table descrip:
and the descrips for each indiv column. PLEASE keep them up to date. moving parts and fragility here, but as long as code has the "id", and the
NO Rich Text Support (Internal)
field is accurate (jason will determine this), this should be a glorious alternative to the many, many hours we've gone back and forth on tiny content edits from the get-go. all important, but suckling off Ross and Jason's time and resources. content ball in Ross's court now!