Skip to content
This repository was archived by the owner on Dec 14, 2018. It is now read-only.

Change the tag helpers FileVersion property to something clearer #2540

Closed
Eilon opened this issue May 11, 2015 · 15 comments
Closed

Change the tag helpers FileVersion property to something clearer #2540

Eilon opened this issue May 11, 2015 · 15 comments

Comments

@Eilon
Copy link
Member

Eilon commented May 11, 2015

We have a few tag helpers (Link, Script, and the upcoming Image) that have a FileVersion property that indicates whether to add a "version" to the URL to help with cache busting.

The property name is a bit confusing: it looks like it is a file version, as opposed to saying whether to append a file version.

I recommend changing the property to be AppendVersion or similar because that'll be a lot clearer about what it does.

@danroth27
Copy link
Member

@DamianEdwards thoughts?

@DamianEdwards
Copy link
Member

Sure

@danroth27 danroth27 added this to the 6.0.0-beta6 milestone May 14, 2015
@danroth27 danroth27 assigned Eilon and unassigned Eilon May 14, 2015
@dpaquette
Copy link
Contributor

Any objection to me tackling this one on the weekend?

@Eilon
Copy link
Member Author

Eilon commented May 14, 2015

Yeah that would be great. Let's settle on a name. Here are a few ideas:

  • AppendFileVersion / AddFileVersion
  • AppendVersion / AddVersion
  • AppendFileHash / AddFileHash
  • AppendHash / AddHash
  • CacheBust

I do kind of like my original suggestion of AppendVersion because it's concise and reasonably clear about what it does.

Thoughts?

@danroth27
Copy link
Member

I can live with AppendVersion. I also like AddFileVersion.

@dpaquette
Copy link
Contributor

I like AppendVersion

@dougbu
Copy link
Member

dougbu commented May 14, 2015

Is this about just the property name? Note that's irrelevant in every scenario except unit testing. The attribute name (what users see in the Razor source) is currently asp-file-version.

If we're going to change the attribute as well, would the name there be asp-append-version?

@danroth27
Copy link
Member

Yup.

@Eilon
Copy link
Member Author

Eilon commented May 14, 2015

@dougbu yes it's just the property name and yes we'd rename the tag helper attribute name.

Sounds like everyone wants to go with AppendVersion!

@DamianEdwards
Copy link
Member

👍

dougbu pushed a commit that referenced this issue May 29, 2015
…e busting

FileVersion property renamed to AppendVersion in ImageTagHelper,
LinkTagHelper and ScriptTagHelper.

asp-file-version attribute renamed to asp-append-version.

Resolves issue #2540
@dougbu dougbu added 3 - Done and removed 1 - Ready labels May 29, 2015
@dougbu dougbu self-assigned this May 29, 2015
@dougbu
Copy link
Member

dougbu commented May 29, 2015

3fe0490

@dougbu dougbu closed this as completed May 29, 2015
@Daniel15
Copy link
Contributor

Daniel15 commented Aug 3, 2015

The web app template in Visual Studio still uses asp-file-version, looks like it wasn't updated.

@NTaylorMullen
Copy link
Contributor

/cc @rustd

@Daniel15
Copy link
Contributor

Daniel15 commented Aug 3, 2015

I get a 404 on that link; is it a private repo?

@danroth27
Copy link
Member

Yeah, sorry about that. Removing the link to avoid further confusion.

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

No branches or pull requests

7 participants